我will_paginate在我的ROR项目中使用gem 来显示页面中的记录.
我想在不重新加载整个页面的情况下加载下一页ajax.
我在网上找到了一些例子,但它们对我不起作用.
这该怎么做?
我使用Rails3,JQuery和will_paginate gem来制作远程分页链接.已知的解决方案是:
$('.pagination a').live('click',function (){
$.getScript(this.href);
return false;
});
Run Code Online (Sandbox Code Playgroud)
使用此代码,我得到如下链接:http://localhost:3000/products?_=1300468875819&page=1或http://localhost:3000/products?_=1300468887024&page=2.所以小问题是:这个奇怪的参数是什么_=1300468887024(看起来像Unix时间).它的目的是什么?据我所知,这可能会导致搜索爬虫出现问题.