开发者

Getting "rawDestElement is undefined" using jQuery Plugin Quicksand

开发者 https://www.devze.com 2023-02-14 08:24 出处:网络
I am using the jQuery Quicksand plugin -- http://jsfiddle.net/se9pY/ but I get rawDestElement is undefined in FireBug...

I am using the jQuery Quicksand plugin -- http://jsfiddle.net/se9pY/

but I get rawDestElement is undefined in FireBug...

$(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' });
    });
});

What开发者_运维问答s wrong?


I had this problem a while back, turned out to be a simple oversight. You probably figured this out by now, but you likely just need a unique data-id attribute on all list items.

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

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号