Home > Web Front-end > JS Tutorial > jQuery selector symbol analysis

jQuery selector symbol analysis

小云云
Release: 2017-11-28 10:11:53
Original
1769 people have browsed it

jQuery is a cross-browser JavaScript library that simplifies operations between HTML and JavaScript. We often use it during programming development, so in this chapter we will briefly introduce to you the meaning of some symbols in jQuery selectors.

Space: $('#phpernote span')

means to get all span nodes and all descendants under id=phpernote.

Greater than sign: $('#phpernote > span')

means to obtain all the first-level span nodes with id=phpernote, that is, the first generation, and will not be obtained for other generations.

Plus sign: $('#phpernote + .com')

means to obtain the next class=com sibling node of the id=phpernote node, which is equivalent to the next() method.

Tilde sign: $('#phpernote ~ span')

means to obtain all span sibling nodes behind the node with id=phpernote, which is equivalent to the nextAll() method.

The above is the symbol analysis in several jQuery selectors, I hope it can help everyone.

Related recommendations:

What is the use of the ampersand symbol before the php function

How to use the reference ampersand symbol? Detailed explanation of usage examples of php & symbol

10 recommended articles about operation symbols

The above is the detailed content of jQuery selector symbol analysis. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template