$('#content')[0].scrollHeight
will give you the inner height of the DIV. When
scrollTop + height >= scrollHeight
you are near the end of the DIV. That's a rough calculation: borders,
margins, paddings and the alignment of the planets can affect it.
$.fn.isNearTheEnd = function() {
return t
On Sep 28, 10:54 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> How can I detect when the user has scrolled near the end of a div with
> a scroll bar so that I can add more content?
>
> I tried something like this:
>
> $('div#content').scroll(function(){
> if ($('div#content').
If it helps, I believe this is the source code for the scrollTop
method but I can't quite decipher what's going on. Could someone
interpret it for me, just to tell me what the value means that it
returns when it acts on a div?
// Create scrollLeft and scrollTop methods
jQuery.each( ['Left', 'To
Any thoughts on this? Anyone? I'm completely stuck.
-Greg
On Sep 28, 10:54 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> How can I detect when the user has scrolled near the end of a div with
> a scroll bar so that I can add more content?
>
> I tried something like this:
>
> $('div#con
4 matches
Mail list logo