1. Multi-Criteria Selector
Purpose: Select multiple labels at the same time using multiple criteria
Usage: $ ("Condition 1, Condition 2, Condition 3, ..., condition n");
Characteristics: Multiple conditions are separated by commas within "";
Use Case: $ ("div#id,span.tip,p"); Also select the DIV tag with id "id", the span label with the class "tip" and the P tag; 2, relative selector
Purpose: Use the second parameter to select a relative element without affecting other elements with the same conditions
Usage: $ ("Condition 1", condition 2);
Features: two parameters
Case:
$ ("TD", (this)). CSS ("Background", "Red");
The TD element background of the current TR is red, and the TD in the other TR is unchanged; 3, Hierarchy selector
Purpose: Select descendant nodes
Usage: $ ("Condition 1 Condition 2 Condition 3");
Characteristics: Double quotation marks, between the conditions separated by a space;
Use Case: $ ("#com ul Li");
Select all LI nodes inside ul of the element with ID as COM;
JQuery Selects an implementation method that contains two class elements
<element class= "a B" >
?
1. Intersection Selection: $ (". A.b")--Select the element that contains both A and B.
2. The set selection: $ (". A,. B")--Select the element that contains a or contains B.
Select E[attr=val][attr=val based on multiple attributes]
$ ("div[title= ' ttt '][class= ' aaaa ']"). Click ()
All attributes under all DIV elements the title value is equal to TTT and the attribute class equals AAAA element