#id: $ (' #div '); Find id= ' div ';
. Class: $ ('. MyClass '); Find class= ' MyClass ';?
Element: Used to search for elements, pointing to the tag name of the DOM node: $ (' div '); ? Find DIV elements
Selector: Used to get multiple element tags: $ (' Div,p,span ');//Find element div span P
: Nth-child (N): Gets the nth label of descendants:?
$ (' #wrap: Nth-child (2) ');//Gets the 2nd sub-label under #wrap (Note: $ (' #wrap: Nth-child (2) '); the middle without a space means to get the 2nd label of the same generation)
: First-child\:last-child: Gets descendants first \ Last child tag:
$ (' #wrap: First\last-child ');//Get #wrap under the first \ Last sub-label there is no space between the two to get the first \ Last label of the same generation;
Elem+next: Get elem Next sibling tag:
$ ('. Li1+li ')?; /get. Li1 followed by the sibling tag
Prev~sibing: Get all sibling tags behind prev:
JQ Common Selector