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.
Asked
Active
Viewed 1,385 times
1 Answers
2
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.

mar10
- 14,320
- 5
- 39
- 64
-
Every visible node has a parent, since there is always the invisible system root. – mar10 Sep 18 '15 at 04:51