1

i want to add some functionality to my page when it is completely scrolled down. can any one tell is the any way to find whether the page is completely scrolled down using Jquery?

yuvraj
  • 11
  • 1
  • Duplicate: http://stackoverflow.com/questions/2837741/jquery-detecting-reaching-bottom-of-scroll-doesnt-work-only-detects-the-top This should anwser it. – Connor Tumbleson Feb 01 '12 at 04:36

3 Answers3

1

Try this.

$(window).scroll(function(){
   if(($(document).height() - $(document).scrollTop()) == $(window).height()){
       //Scroll reached at the bottom 
   }
});

Demo

ShankarSangoli
  • 69,612
  • 13
  • 93
  • 124
1

jQuery Waypoints is the right tool for the job. There are several demos highlighting the event driven model that Waypoints utilizes.

danott
  • 923
  • 1
  • 8
  • 14
0

for scroll mapping, u can use this;

$(window).scroll(function() {
   var scrollVal = $(this).scrollTop();
   //console.log(scrollVal);

   if ( scrollVal > 0 && scrollVal < 100 ){
     //code
   }else if ( scrollVal > 100 && scrollVal < 200 ) {
     //code
   }else{ //bigger than 200px
     //code
   }

});
Barlas Apaydin
  • 7,233
  • 11
  • 55
  • 86