190
rated 0 times
[
197]
[
7]
/ answers: 1 / hits: 15440
/ 13 Years ago, wed, march 14, 2012, 12:00:00
And once it hits the bottom,then have a callback function?
More From » jquery
And once it hits the bottom,then have a callback function?
You can use .scroll() event in this way on your window:
$(window).scroll(function() {
if($(window).scrollTop() + $(window).height() == $(document).height()) {
alert(bottom!);
}
});
check live demo
to detect if the user is 3/4 down the page you can try this one
$(window).scroll(function() {
if($(window).scrollTop() + $(window).height() > $(document).height() - .75*$(document).height()) {
alert(3/4th of bottom!);
}
});