我使用无限涡旋通过ajax将新的内容/图像加载到wordpress主题的索引中。
本网站为live at:http://mylife.holstee.com/
下面是我正在使用的代码,它在require.js中很深,并且被缩小了,所以您将无法亲眼看到它。
$container.infinitescroll({
nextSelector: "#mylife-quinary .next-link a",
navSelector: "#mylife-quinary .next-link",
itemSelector: "#mylife-quaternary .item"
}, function( newElements ) {
mylife.quote();
var $newElems = $( newElements ).css({ opacity: 0 });;
$newElems.imagesLoaded(function(){
$newElems.animate({ opacity: 1 });
$container.masonry( 'appended', $newElems );
});
}
);
$container.imagesLoaded( function(){
$container.masonry({
itemSelector : '.item',
columnWidth : $(".item").outerWidth(true)
});
});我想要的是一个更流畅的界面,这样你就不用等待新的内容了。有什么想法吗?
发布于 2013-07-15 14:29:10
来自www.infinite-scroll.com
element.infinitescroll({
// ...
bufferPx : 40,
// increase this number if you want infscroll to fire quicker
// (a high number means a user will not see the loading message)
// new in 1.2
// default: 40
// ...
});https://stackoverflow.com/questions/17656599
复制相似问题