聯(lián)系官方銷售客服
1835022288
028-61286886
欄目列表 瀑布流自動加載 改為手動點擊加載
<div class="article_info" id="content_list"> {template "list_data.html"} </div> <div class="load-more-area" id="is_ajax_btn"> <a href="[removed]dr_ajax_load_more();" class="article-list-load-more show"> 加載更多 </a> </div>
,按鈕無效? 如何關(guān)閉自動加載?
<script> var Mpage=1; //滾動顯示更多 var scroll_get = true; //做個標(biāo)志,不要反反復(fù)復(fù)的加載 $(document).ready(function () { $(window).scroll(function () { if (scroll_get==true && (400 + $(window).scrollTop())>($(document).height() - $(window).height())) { scroll_get = false; layer.msg('內(nèi)容加截中,請稍候',{time:1000}); dr_ajax_load_more(); } }); }); function dr_ajax_load_more(){ Mpage++; $.get('/index.php?s=api&c=api&m=template&name=list_data.html&module={MOD_DIR}&catid={$catid}&format=json&page='+Mpage+'&'+Math.random(),function(res){ $('.footer-cont').hide(); if(res.code==1){ if(res.msg==''){ layer.msg("已經(jīng)顯示完了",{time:500}); }else{ $('#content_list').append(res.msg); scroll_get = true; } }else{ layer.msg(res.msg,{time:2500}); } }, 'json'); } </script>
回復(fù)@翅膀 沒有報錯 加載正常 就是 加載完畢數(shù)據(jù)后后 不提示記載完畢 一直 提示 數(shù)據(jù)加載中