In Tritium, can I select all children of a node?

128 views Asked by At

I have a div that has several child divs. Some have ID's and classes, some do not.

I have used move_children_to() and was wondering if there is something similar to select the children.

1

There are 1 answers

0
Ben Thefbfairy Bayard On BEST ANSWER

There are a few different ways to select the immediate children.

First you can do:

$("./*") {
  # code for children goes here.
}
move_children_to("..", "after)

Another way to handle this would be to just open a scope on move_children_to()

move_children_to("..", "after) {
  # children code can go here.
}

I hope this helps! Let me know if I can provide any more assistance.