为此可使用后代选择器。
使用class选择器代替后代选择器。
避免使用后代选择器,特别是那些指定多余祖先的。
Avoid using descendant selectors, especially those that specify redundant ancestors.
如果您必须使用后代选择器,尽量使用子代选择器,这最少只需评估一个额外的节点,而非中间直至祖先的所有节点。
If you must use descendant selectors, prefer child selectors, which at least only require evaluation of one additional node, not all the intermediate nodes up to an ancestor.
find函数或许是功能最强大的函数,它允许使用jQuery选择器搜索jQuery对象中元素的后代元素。
Perhaps most powerful is the find function, which allows you to use a jQuery selector to search through the descendants of elements in your jQuery object.
当使用后代选择符,右边的一个元素选择器是被选择的,不管左边的元素选择器标签有几个。
When using the descendant combinator, an element selector on the right is selected if it falls anywhere between the tags of the element selector on the left.
当使用后代选择符,右边的一个元素选择器是被选择的,不管左边的元素选择器标签有几个。
When using the descendant combinator, an element selector on the right is selected if it falls anywhere between the tags of the element selector on the left.
应用推荐