On Tue, May 3, 2011 at 8:44 PM, Ben Barber <[email protected]> wrote:

> On Tue, May 3, 2011 at 1:38 AM, Amit Agarwal <[email protected]> wrote:
>
>> I need to trigger an action as soon as the div is done with the scrolling.
>> [...]
>> -Amit
>>
>
> Hey Amit, I'm glad you found a solution to detecting when the user has
> scrolled to the bottom of an element. I'm just curious, are you observing
> the 'scroll' event (http://www.quirksmode.org/dom/events/scroll.html) or
> are you polling for changes to element.scrollTop?
>

I am listening to "scroll" event.

>
> On Tue, May 3, 2011 at 2:15 AM, Amit Agarwal <[email protected]> wrote:
>
>> [...] It would trigger the event once scrollTop = inner content height -
>> container height.
>
>
> Just for future reference, the properties you are referring to are
> element.scrollTop, element.scrollHeight, and element.clientHeight. The
> Mozilla Developer Network article documents some of these properties at
> http://developer.mozilla.org/en/Determining_the_dimensions_of_elements.
>
> Some other references:
>  - "When you scroll the element all the way down, scrollHeight should be
> equal to scrollTop + clientHeight",
> http://www.quirksmode.org/dom/w3c_cssom.html#t36.
>  - These properties are documented (retroactively) in the CSSOM
> specification (working draft status), http://www.w3.org/TR/cssom-view/.
>  - Microsoft's article on 'Measuring Element Dimension and Location' is a
> good starting point as well since most of these properties were first
> introduced in Internet Explorer,
> http://msdn.microsoft.com/en-us/library/ms530302.aspx.
>
Awesome stuff! Thanks for providing references.

>
> Peace!
>
> Ben Barber
>
> --
> To view archived discussions from the original JSMentors Mailman list:
> http://www.mail-archive.com/[email protected]/
>
> To search via a non-Google archive, visit here:
> http://www.mail-archive.com/[email protected]/
>
> To unsubscribe from this group, send email to
> [email protected]
>

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to