Is HTML text string within current scrolling visible area of browser window?

Keith Clarke keith.clarke at clarkeandclarke.co.uk
Sun Mar 27 10:44:16 EDT 2011


...thanks again, Jim - I'll study that option, too.
Best,
Keith..

On 27 Mar 2011, at 14:57, Jim Ault wrote:

>> I'm trying to discover whether it's possible to check programmatically (maybe with Javascript, Jquery, etc.) whether a specific element on a web page (that is readable from the page HTML), such as a specific div, tag or string, is currently within the visible rendered page area of a browser window with a (vertical) scroll bar.
>> 
>> Otherwise, if it's a specific page - with a known layout and therefore calculable coordinates for the element to find - is it possible to know how the browser window's current size and scroll offset relate to the 'underlying' page?
> 
> This is a link to a page that gives a detailed javascript answer, including sample code for calculating based on browser quirks.
> It is a good read.
> 
> http://bit.ly/i00upp
> 
> (you should be able to see the entire discussion before being limited to a preview.  Let me know if you have problems)
> 
> 
> Jim Ault
> Las Vegas





More information about the use-livecode mailing list