【发布时间】:2015-05-04 19:11:06
【问题描述】:
我在使用 ajax 无限滚动时遇到问题,并且浏览器中的后退按钮将我返回到页面的上一个加载部分。如何让它返回上一页?
$(document).ready(function() {
// Infinite Ajax Scroll configuration
jQuery.ias({
container : '.wrap', // main container where data goes to append
item: '.item', // single items
pagination: '.nav', // page navigation
next: '.nav a', // next page selector
loader: '<img src="css/ajax-loader.gif"/>', // loading gif
triggerPageThreshold: 3 // show load more if scroll more than this
});
});
这是导航:
<?php if (isset($next)): ?>
<div class="nav">
<a href='index.php?p=<?php echo $next?>'>Next</a>
</div>
<?php endif; ?>
现在我应该为此使用 Rewrite,因为它为我的 url 添加了一个新值,还是有其他解决方案?
代码来自此页面:link
【问题讨论】: