Home  >  Article  >  Web Front-end  >  What selectors does jQuery have?

What selectors does jQuery have?

coldplay.xixi
coldplay.xixiOriginal
2020-11-16 16:24:208920browse

jQuery selector: 1. Hierarchical selector; 2. Basic filter selector; 3. Content filter selector; 4. Visibility filter selector; 5. Attribute filter selector.

What selectors does jQuery have?

Recommendation: "jquery video tutorial"

jQuery selector:

1. The basic ones include id, tag, class, and wildcard selectors:

#id
element
.class
*

2. Hierarchical selectors:

ancestor descendant
parent > child
prev + next
prev ~ siblings

3. Basic filter selector

:first
:last
:not
:even
:odd
:eq
:gt
:lt
:header
:animated

4. Content filter selector

:contains
:empty
:has
:parent

5. Visibility filter selection Filter

:hidden
:visible

6. Attribute filter selector

[attribute]
[attribute=value]
[attribute!=value]
[attribute^=value]
[attribute$=value]
[attribute*=value]
[attrSel1][attrSel2][attrSelN]

7. Child element filter selector

:nth-child
:first-child
:last-child
:only-child

8. Form selector

:input
:text
:password
:radio
:checkbox
:submit
:image
:reset
:button
:file
:hidden

9. Form filter selector

:enabled
:disabled
:checked
:selected

Related free learning recommendations: JavaScript(Video)

The above is the detailed content of What selectors does jQuery have?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:How to import jqueryNext article:How to import jquery