Reputation: 1280
I use sorting plugin. When I move element1 to some other element2, I need to iterate over all siblings of element2. How can I do that? Moreover, I need to get some custom data- attribute for each element.
Upvotes: 1
Views: 1508
Reputation: 14794
Something like this (untested) should do the trick:
node.getParent().visit(function(n){
// Access n.data.myAttr ...
});
or simply iterate over the node.getParent().children
array.
Upvotes: 2