[英]In Tritium, can I select all children of a node?
我有一個具有多個子div的div。 有些具有ID和類,有些則沒有。
我使用過move_children_to(),想知道是否有一些選擇子項的方法。
有幾種不同的方法選擇直系子代。
首先,您可以執行以下操作:
$("./*") {
# code for children goes here.
}
move_children_to("..", "after)
解決此問題的另一種方法是只在move_children_to()
上打開一個作用域
move_children_to("..", "after) {
# children code can go here.
}
我希望這有幫助! 讓我知道是否能提供更多幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.