What types of selectors are there in jQuery
This article is about what types of selectors are available in jQuery. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
What types of selectors are there in jQuery?
Basic selector: returns matching DOM elements directly based on id, CSS class name, and element name.
Hierarchical selector: also known as a path selector, you can select the corresponding DOM elements according to the path hierarchy. Parent > child,prev + next, prev ~ siblings
Form selector:: input,: text,: password,: radio,: checkbox,: submit, etc.
Filter selector: based on the previous filter, filter the relevant conditions to get the matching DOM elements. Basic filter selector:: first,:last,: not,: even,: odd,: eq,: gt,: lt content filter selector:: contains,: empty,: has,: parent visibility filter selector:: hidden,: visible attribute filter selector: [attribute], [attribute=value], [attributive attribute value], [attribute^ = value], [attribute$=value], [attribute*=value] child element filter selector: nth-child, first-child: : last-child,: only-child form filter selector:: enabled,: disabled,: checked,: selected
Thank you for reading! This is the end of this article on "which types of selectors in jQuery". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!