.prevUntil( [selector ] [, filter ] )Returns: jQuery
Description: Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.
-
version added: 1.4.prevUntil( [selector ] [, filter ] )
-
version added: 1.6.prevUntil( [element ] [, filter ] )
-
elementA DOM node or jQuery object indicating where to stop matching preceding sibling elements.
-
filterType: SelectorA string containing a selector expression to match elements against.
-
.prevUntil()
method searches through the predecessors of these elements in the DOM tree, stopping when it reaches an element matched by the method's argument. The new jQuery object that is returned contains all previous siblings up to but not including the one matched by the .prevUntil()
selector; the elements are returned in order from the closest sibling to the farthest.
.prevAll()
method does when no filter selector is provided.
Example:
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
33
34
35
36
37
|
|