I have a table and i made it scrollable by doing overflow : auto; Now i want to know if the vertical scroll bar reached the bottom so that i can display next 5 row which wer
try this
<script type="text/javascript">
$(document).ready(function(){
var tbody = $('#mailServerTbody');
var heightOfTbody = 0;
$("#mailServerTbody tr").each(function(){
heightOfTbody = heightOfTbody + $(this).height();
});
$('#mailServerTbody').scroll(function(){
if(heightOfTbody == ($(this).scrollTop() + $('#mailServerTbody').height() ))
{
alert("reached last")
}
});
});
</script>