ppypp伦理天堂,91手机在线视频,免费在线观看黄色毛片,夜夜穞天天穞狠狠穞AV美女按摩

聯系官方銷售客服

1835022288

028-61286886

投訴 分享 瀑布流 判斷最后一頁 1 0
POSCMS版本:3.3.1
          <div id="xkxk"><a href="javascript:dr_loading();">加載完畢</a></div>
<script>
var dr_page = 1;
var nums = {$nums};
$('#xkxk').hide();
$(window).scroll(function(event) {
if ($(document).scrollTop() + $(window).height() >= $(document).height()) {
    dr_page++; // 加載下一頁的意思
   
 $.get('{SITE_URL}index.php?s={MOD_DIR}&c=api&m=template&name=txt-list-data.html&catid={$catid}&page='+dr_page,
 function (html) {
       $('.txt-list-data').append(html); // 將返回的內容追加到內容區域
     // 將返回的內容追加到內容區域
    });
if (dr_page >= nums) {
  $('#xkxk').show();
}//判斷 當前頁是否大于總頁數 
}
});
</script>
最近有個客戶 有需求 自動加載下一頁 沒有了提示加載完畢。 另類的實現。歡迎高手再來指教 更好的辦法
解決方案
  • $(document).ajaxStart(function(){
        $(".xkxk").replaceWith("<a href='javascript:;'>正在加載…</a>")
    }).ajaxStop(function(){
        $(".xkxk").replaceWith("<a href='javascript:dr_loading;'>加載更多</a>")
    })