要在jQuery中选择子节点,可以使用children(),但也可以使用find().
例如:
$(this).children('.foo');
给出与以下相同的结果:
$(this).find('.foo');
现在,哪个选项最快或者首选,为什么?
jquery jquery-selectors
jquery ×1
jquery-selectors ×1