2011-02-28 47 views
2

我現在用的是jQuery Quicksand plugin - http://jsfiddle.net/se9pY/入門 「rawDestElement未定義」 使用jQuery插件流沙

但我得到的螢火rawDestElement is undefined ...

$(function() { 
    $("#filter a").click(function() { 
     var $this = $(this), 
       $oriColl = $("#boxes"), 
       $clonedColl = $oriColl.clone(), 
       filtered = ($this.text() == "all") ? $("#boxes li") : $("#boxes li[data-type=" + $this.text() + "]"); 

     $("#boxes").quicksand(filtered, { duration: 800, easing: 'easeInOutQuad' }); 
    }); 
}); 

的哪些錯誤?

回答

9

我曾經遇到過這個問題,原來是一個簡單的疏忽。您現在可能已經瞭解了這一點,但您可能只需要在所有列表項目上使用唯一的data-id屬性。

<li data-type="test" data-id="id-1">...</li>