使用jQuery Plugin Quicksand获取“rawDestElement未定义”

时间:2011-02-28 10:04:34

标签: javascript jquery quicksand

我正在使用jQuery Quicksand plugin - http://jsfiddle.net/se9pY/

但我在FireBug中获得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' });
    });
});

怎么了?

1 个答案:

答案 0 :(得分:9)

我曾经有过这个问题,原来是一个简单的疏忽。您现在可能已经想到了这一点,但您可能只需要在所有列表项上使用唯一的data-id属性。

<li data-type="test" data-id="id-1">...</li>
相关问题