Basic Selector
$ (' #id ')--match all #id
$ (' P ')--match all P tags
$ ('. class ')--match all. Class
$ (' * ')--$ (' #id * ') matches all child nodes under #id
$ (' #id,. class ')--matches all #id and. Class
Hierarchy Selector
Parent-Child Hierarchy
$ (' #parent. Span1 ')--match all the class attributes in the parent child node to Span1 (match span1 in all derived subnodes)
$ (' #parent > P ')--matches all P tags in the parent node (only the P of the Son node, the p of the grandson node will not be matched)
Sibling level
$ (' Pre + Next ')--match next to the pre (no node next to the pre will be matched to)
$ (' Pre ~ next ')--match all next to the pre (as long as the next on the pre will be matched)
Filter selector (no spaces before and after a colon)
Simple filtering
$ (' Li:first ')--match the first Li tag
$ (' li:last ')--match last Li Tag
$ (' #id p:not (#np) ')--match #id All ID is not NP p label
$ (' li:odd ')--an odd number of Li (index starting from 0)
$ (' Li:even ')--an even number of Li (index starting from 0)
$ (' li:eq (0) ')--No. 0 Li (Index starting from 0)
$ (' li:gt (0) ')--No. 0 + 1 li (Index starting from 0)
$ (' li:lt (1) ')--第1-1个 Li (Index starting from 0)
$ ('. H:header ')--match all. h title tags, for example (H1,H2 ... )
Content filtering
$ (' Div:contains (' contains ') ')--will match all content containing contains div, and multiple div nesting will also match to the outer div