2011-02-28 48 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>