javascript - How can I use JQuery to check if a div is scrolled all the way to the bottom? -


i have div overflow:scroll.

i want know if it's scrolled way down. how, using jquery?

this 1 doesn't work: how can determine if div scrolled bottom?

here correct solution (jsfiddle). brief @ code:

$(document).ready(function () {     $('div').bind('scroll', chk_scroll); });  function chk_scroll(e) {     var elem = $(e.currenttarget);     if (elem[0].scrollheight - elem.scrolltop() == elem.outerheight()) {         console.log("bottom");     } } 

see this more info.


Comments