2
嗨我試圖設置一個使用jQuery Masonry和Infinite scroll的網站,但我似乎無法讓它在OSX或Chrome上運行。無法讓jQuery Masonry + Infinite Scroll在Safari和Chrome上工作
的開發網站http://bit.ly/hYJ3Cq
我不是在控制檯中得到任何JavaScript錯誤。
事情我已經嘗試:
- 使用舊的jQuery庫
- 移動JS砌築的div
- 內設置圖像寬度/高度頭,而不是頁腳
- 加式=「TEXT/javascript「腳本標記
- 驗證html
- 在jQuery(window).load(和jQuery(document).ready(
這是我與工作的代碼非常相似,演示代碼工作正常:
jQuery(window).load(function(){
jQuery('.hfeed').masonry({
singleMode: true,
itemSelector: '.box'
});
jQuery('.hfeed').infinitescroll({
navSelector : '.pagination', // selector for the paged navigation
nextSelector : '.pagination .next', // selector for the NEXT link (to page 2)
itemSelector : '.box', // selector for all items you'll retrieve
loadingImg : '/wp-content/themes/sprppl/images/loader.gif',
loadingText : "Loading...",
donetext : 'No more pages to load.',
debug: false,
errorCallback: function() { jQuery('#infscr-loading').animate({opacity: .8},2000).fadeOut('normal'); }
},
// call masonry as a callback
function(newElements) { jQuery(this).masonry({ appendedContent: jQuery(newElements) }); }
);
});
任何幫助將非常感激。
由於LekisS - columnWidth似乎已經完成了這個把戲。 – Jason 2011-03-16 16:57:23