2012-03-01 30 views
0

我不知道是否它是正確的,我在做什麼,但如果不讓我知道。我有一個關於這個前一篇文章的問題:Problems using jQuery quicksand with fancybox使用jQuery流沙與fancybox的問題,重溫

fancybox工作完美,但我有一個問題。當我使用的腳本:

$("a.grouped_elements").fancybox({ 
'titlePosition'  : 'inside', 
'titleFormat'  : function(title, currentArray, currentIndex, currentOpts) { 
    return '<span id="fancybox-title-inside">Image ' + (currentIndex + 1) + '/' + 
       currentArray.length + (title.length ? ' &nbsp; ' + title : '') + 
      '</span>'; 
} 

它的沙盒插件,這是克隆的元素,以便將它們輕鬆地安排,它克隆了第一套5次,其餘的3倍,所以我的第一個畫廊有7張圖片由5個沙箱克隆=圖庫中的35個圖像第二個圖庫中有4個3個克隆= 12個圖像,等等。

我該如何解決這個問題?

Here's鏈接到網站:http://www.lslx-web.com/teste/index.html


再次,喜歡你的人arttronics是很好的人。它工作。

+0

這個稱號完全是undescriptive,請改正 – 2012-03-01 16:07:53

+0

我們感謝您的快樂,祝您有個好的答案,但請不要*添加答案*來表達這一點。他們會被刪除(並損害您的帳戶,因爲您是如此新)。您可以在50個代表處對其他答案發表評論,或者如果您擁有該問題或答案,現在就可以發表評論另外,如果答案對您有用,請注意並選擇正確的答案。 – Will 2012-03-05 18:33:53

回答

1

製作漂亮的HTML5產品組合教程網站不會爲您發佈解決方案,但我認爲這是一個很好的地方,因爲其他人有這個問題。

第一個,您的網頁的頭部部分應該看起來像THIS以糾正基本錯誤。

第二個,你的身體部分有很多li標籤而沒有關閉它們。

,這裏是解決方案具有的fancybox和其他的jQuery燈箱克隆腳本在畫廊模式中使用不緩存鏈接:

// This jQuery shown is part of your customized .js file for use with quicksand.js 
$('#stage').quicksand(link.data('list').find('li'), function() { 

    // 
    // Place your usual jQuery or Javascript GALLERY markup here with CLONING issue (not for cached gallery links). 
    // 

    // This next jQuery line should be placed prior to the closing of your function. 
    // All hidden items Quicksand has set on the webpage will be removed which in turns removes the CLONED jQuery elements. 
    // When the Quicksand Menu Filter Button is used again, your filtered items will remain correct in gallery length. 
    $('section#container').find('ul.hidden').remove(); 

}); 
+0

「第三」解決了我的問題:) Tnx很多! – 2013-01-27 16:24:39