From jQuery JavaScript Library
(Redirected from
DOM/Traversing)
Filtering:| Name | Type |
Traversing/contains
| filter( expr ) | Returns: jQuery |
| Keeps only the elements from the set of matched elements that match the specified expression(s). |
| filter( fn ) | Returns: jQuery |
| Keeps only the elements from the set of matched elements where the specified function returns a non-false value. |
| is( expr ) | Returns: Boolean |
| Checks the current selection against an expression and returns true, if at least one element of the selection fits the given expression. |
| not( expr ) | Returns: jQuery |
| Removes elements matching the specified expression from the set of matched elements. |
Finding:| Name | Type |
| add( expr ) | Returns: jQuery |
| Adds more elements, matched by the given expression, to the set of matched elements. |
| children( expr ) | Returns: jQuery |
| Get a set of elements containing all of the unique immediate children of each of the matched set of elements. |
| find( expr ) | Returns: jQuery |
| Searches for descendent elements that match the specified expression. |
| next( expr ) | Returns: jQuery |
| Get a set of elements containing the unique next siblings of each of the given set of elements. |
| parent( expr ) | Returns: jQuery |
| Get the direct parent of an element. If called on a set of elements, parent returns a set of their unique direct parent elements. |
| parents( expr ) | Returns: jQuery |
| Get a set of elements containing the unique ancestors of the matched set of elements (except for the root element). |
| prev( expr ) | Returns: jQuery |
| Get a set of elements containing the unique previous siblings of each of the matched set of elements. |
| siblings( expr ) | Returns: jQuery |
| Get a set of elements containing all of the unique siblings of each of the matched set of elements. |
Chaining:| Name | Type |
| end( ) | Returns: jQuery |
| Revert the most recent 'destructive' operation, changing the set of matched elements to its previous state (right before the destructive operation). |