/** * 投资列表滚动加载数据 * $("#lendListCon")为在哪个DIV里面滚动 */ $("#lendListCon").scroll(function() { var scrollTop = $("#lendListCon").scrollLeft(); var scrollHeight = $("#lendListOther").width(); var windowHeight = $(window).width(); console.log(scrollTop); if (scrollTop+windowHeight>= scrollHeight) { if (_IndexObj.lendasynFlag == true && _IndexObj.lendloadFlag == true) { _IndexObj.loadLendProduct(); } } });
注:在套页面加载的时候,正常用到,页面滚动到底部加载数据,或者页面滚动到右边加载数据