jQuery实现滚动加载

    xiaoxiao2025-06-04  25

    /****滚动加载函数***/ function loadData(callback) { var totalheight = parseFloat($(window,document).height()) + parseFloat($(window,document).scrollTop()); if ($(document).height() <= totalheight) { //通过回调函数进行加载数据 callback(); } } //调用 $(window,document).scroll(function(){ loadData(function(){ alert('数据加载中。。。。。。') }); });
    转载请注明原文地址: https://ju.6miu.com/read-1299579.html
    最新回复(0)