We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
除了上面的选择器,我们还要了解一点点筛选的方法:
Get the descendants(子节点) of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
$('li.item-ii').find('li').css('background-color', 'red');
Reduce(减少) the set of matched elements to those that match the selector or pass the function's test.
$('li').filter(':even').css('background-color', 'red');
The text was updated successfully, but these errors were encountered:
No branches or pull requests
jquery常用选择器
筛选方法
除了上面的选择器,我们还要了解一点点筛选的方法:
.find(selector) 查找集合每个元素的子节点
Get the descendants(子节点) of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
.filter(selector) 过滤当前集合内元素
Reduce(减少) the set of matched elements to those that match the selector or pass the function's test.
The text was updated successfully, but these errors were encountered: