Use jQuery to Detect if User has Scrolled to the Bottom or Top of a Page
february 2012 by ChrisLTD
$(function () {
var $win = $(window);
$win.scroll(function () {
if ($win.scrollTop() == 0)
alert('Scrolled to Page Top');
else if ($win.height() + $win.scrollTop()
== $(document).height()) {
alert('Scrolled to Page Bottom');
}
});
});
ios
jquery
scroll
tech
var $win = $(window);
$win.scroll(function () {
if ($win.scrollTop() == 0)
alert('Scrolled to Page Top');
else if ($win.height() + $win.scrollTop()
== $(document).height()) {
alert('Scrolled to Page Bottom');
}
});
});
february 2012 by ChrisLTD
Copy this bookmark: