Reputation: 137
I've used $.unique before, but this timne, I can't get it to work.
I get an array of objects, but it does not seem to do anything with them. I hope you can help me here.
Thanks
Upvotes: 0
Views: 1333
Reputation: 117364
$.unique removes duplicates of a node, but there are not duplicate nodes inside the array, there are 3 different nodes. 2 nodes are not unique when they consist of the same markup, they must be the same DOMNode
for example here you would have duplicates:
[$(".test").get(0),
$(".test").get(0)]
Upvotes: 2