Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
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

 Answers
5

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!);
}
});

[#86859] Tuesday, March 13, 2012, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
trinity

Total Points: 591
Total Questions: 102
Total Answers: 106

Location: Singapore
Member since Sun, Jul 25, 2021
3 Years ago
;