multiple selector
Description: Selects the combined results of all the specified selectors.
-
version added: 1.0jQuery( "selector1, selector2, selectorN" )
selector1: Any valid selector.
selector2: Another valid selector.
selectorN: As many more valid selectors as you like.
You can specify any number of selectors to combine into a single result. This multiple expression combinator is an efficient way to select disparate elements. The order of the DOM elements in the returned jQuery object may not be identical, as they will be in document order. An alternative to this combinator is the .add() method.
Examples:
Example: Finds the elements that match any of these three selectors.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
|
Example: Show the order in the jQuery object.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
|