Created
September 18, 2013 09:33
-
-
Save rajvanshipradeep15/6606779 to your computer and use it in GitHub Desktop.
Detect end of scroll in a div
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style type="text/css"> | |
div.scroll | |
{ | |
width:500px; | |
height:400px; | |
overflow:scroll; | |
} | |
</style> | |
<div class="scroll"> | |
some text is present | |
</div> | |
$('.scroll').scroll(function() { | |
if($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight) { | |
alert('Bottom reached!'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
it's work for me. very good