Run javascript function when div is scrolled to
This question already has an answer here:
You can achieve it using Jquery.
$( '#yourdiv').scroll(function() {
if ( $(this)[0].scrollHeight - $(this).scrollTop() <= $(this).outerHeight()){
//ajax method for getting your data
//append response data to your div
}
});
Refer this for How to implement ajax using jquery
链接地址: http://www.djcxy.com/p/83378.html上一篇: jQuery中的onHide()类型事件