【发布时间】:2014-04-16 16:22:05
【问题描述】:
我有一个包含多个子 div 的 div。有些有 ID 和类,有些没有。
我使用了 move_children_to() 并且想知道是否有类似的东西可以选择孩子。
【问题讨论】:
我有一个包含多个子 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.
}
我希望这会有所帮助!让我知道我是否可以提供更多帮助。
【讨论】: