I have a problem with infinite scrolling... This is the code:
<script>
$(window).scroll(function() {
if($(window).scrollTop() + $(window).height() == $(document).height()) {
alert("test");
}
});
</script>
It alerts when user hits the top of the page, not the bottom. I can't figure out where the problem is. Thanks is advance.