This article mainly introduces jquery's common selection methods? If you are not very clear, you can refer to 1. Select:
First () last () eq () slice () filter () not () has () add ()
2. Use the selected element set as the context:
Find () (child element)
Children () (direct child element)
Contain () (directly sub-elements, including text nodes, without parameters)
Next () (next)
Prev () (previous)
NextAll () (all later)
PrevAll () (all preceding)
NextUntil () (find the sibling element after matching the selector element, no selector is the same as nextAll)
PrevUntil () (locate the first sibling element matching the selector element, with no selector and prevAll () Same)
Siblings () (ALL sibling elements)
Parent () (direct parent element)
Parents () (ALL ancestor elements above)
ParentsUntil () (locate all ancestor elements matching the selector element, with no selector and parents () Same)
Closest () (matches the last ancestor element of the selector and must pass in the selector parameter)
3. restore to the selected Element Set
End () (pop-up stack)
If you want to manually define the selected element set and maintain compatibility with the end () method:
PushStack () (the parameter is an array) (which functions have pushStack operations, find, slice, map, not, filter, closest, add, before, after, replaceWith, append)
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.