1
那麼,如何添加或集成我的砌體流體佈局的無限滾動?我已經google了,但不明白。這是我到目前爲止:如何啓用磚石無限滾動?
/**
* Base js functions
*/
$(document).ready(function(){
var $container = $('.container');
var gutter = 20;
var min_width = 270;
$container.imagesLoaded(function(){
$container.masonry({
itemSelector : '.box',
gutterWidth: gutter,
isAnimated: true,
columnWidth: function(containerWidth) {
var box_width = (((containerWidth - 2*gutter)/3) | 0) ;
if (box_width < min_width) {
box_width = (((containerWidth - gutter)/2) | 0);
}
if (box_width < min_width) {
box_width = containerWidth;
}
$('.box').width(box_width);
return box_width;
}
});
});
});
有人可以幫忙嗎?非常感謝!