让我在Wordpress中使用ajax + pods

时间:2015-04-01 14:52:47

标签: jquery ajax wordpress jquery-ias

所以我想让无限滚动(http://infiniteajaxscroll.com/)来处理HTML部分:

 <div id="pagination">
<span class="pods-pagination-paginate ">
<span class="page-numbers current">1</span>
<a class="page-numbers" href="?action=search_speaker&amp;sort=AZ&amp;pg=2">2</a>
<a class="page-numbers" href="?action=search_speaker&amp;sort=AZ&amp;pg=3">3</a>
<a class="next page-numbers" href="?action=search_speaker&amp;sort=AZ&amp;pg=2">Next ›</a>
</span>
</div>
<div class="wrapper-pane clearfix">
<div class="pane"></div>
<div class="pane"></div>
<div class="pane"></div>
<div class="pane"></div>
</div>

JS代码是:

   var ias = jQuery.ias({
 container: ".wrapper-pane",
 item: ".pane",
 pagination: ".pods-pagination-paginate",
 next: ".next a",
});
ias.extension(new IASTriggerExtension({offset: 2,text: 'Load more items'}));
ias.extension(new IASSpinnerExtension());  
ias.extension(new IASNoneLeftExtension({
  text: 'There are no more pages left to load.'
}));

所以我的问题是没有无限卷轴。我尝试用.on('ready',function(){alert(“its loaded”);})调试它。这个工作正常后,我试图得到相同的滚动或下一个但这些警报不会出现。所以我想也许ias无法识别用户滚动?调试ias有更好的方法吗?

0 个答案:

没有答案