2012-09-29 38 views
-4

這是我面臨的問題 - 它發生有時只是:the problem 這是我的輸出圖像:jQuery的同位素不工作

我需要輸出中相同Pintrest風格。

代碼:

$(document).ready(function(){ 
     var $container = $('#content'); 
$container.isotope({ 
    filter: '*', 
    //layoutMode : '', 
     animationOptions: { 
    duration: 750, 
    easing: 'linear', 
    queue: false, 

    } 



}); 

$('#nav a').click(function(){ 
    var selector = $(this).attr('data-filter'); 
    $container.isotope({ 
    filter: selector, 
    animationOptions: { 
    duration: 750, 
    easing: 'linear', 
    queue: false, 

    } 
    }); 
    return false; 
}); 

}); 

解決: 問題解決了:)

+3

包括你的問題更多信息,粘貼代碼,以便我們可以調試速度更快(HTML,JS等) –

+0

我不能在這裏發表編輯的代碼,所以這裏是鏈接 http://bridgenit.com/home/bridgenit/stapr – behinddwalls

+0

爲什麼所有這些downvoting?問題是制定得不好,但相當清楚,他鏈接到在線沙箱加代碼... – Systembolaget

回答

2

我對你的網站進行測試,這是你的答案:

$('#content').isotope({ 
    itemSelector:'.isotope-item', 
    layoutMode: 'fitRows' 
}); 

更改layoutMode爲其他值這裏可用:http://isotope.metafizzy.co/docs/layout-modes.html

Als Ø你的頭JS應該是這樣的:

<script type="text/javascript"> 
$(document).ready(function() { // Here you listen for the document ready event, when html, css, js are ready 
    $('#part1').load("home/" , function(){ $('#loading').remove();}); 
}); 
//hide frame on resizing the window 
$(window).bind('resize load', function(){ // here you listen for resize and load of images, iframes and others 
    if ($(window).width() < 1349) { 
    $('#frame').hide(); 
    $('#right').css('width' , '85%'); 
    } 
    else { 
    $('#frame').show(); 
    $('#right').css('width' , '72%'); 
    } 
}); 
</script> 
+0

我已經完成了過濾,然後applien'砌體'layoutmode ..但它仍然給予提到的問題在http://i.stack .imgur.com/9pUpq.png ...這個問題有時候會發生..不是每次都有...我的代碼工作得很好.. – behinddwalls

+0

我正在嘗試在我的網站中獲得Pinterest樣式的帖子 – behinddwalls