Detect when scroll is reached end of scroll

Read Time:14 Second

Using jQuery, determine that user has been scrolled until the end of element.

Reference: http://stackoverflow.com/questions/6271237/detecting-when-user-scrolls-to-bottom-of-div-with-jquery

$('.scrollable').bind('scroll', function(){
   if($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight)
   {
        alert('end reached');
   }
});

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.