Description
The .children() method is used to get the children of each element in the set of matched elements, optionally filtered by a selector.
This method has the form:
.children([selector])
Parameter | Description |
---|---|
selector | (optional) Specifies a string containing a selector expression to match elements against |
Return Value
This form returns a jQuery object.
Description
The .closest() method is used to get the first element that matches the selector, beginning at the current element and progressing up through the DOM tree.
This method has the form:
.closest(selector)
Parameter | Description |
---|---|
selector | (required) Specifies a string containing a selector expression to match elements against |
Return Value
This form returns a jQuery object.
This method has an alternate form:
.closest(selector [, context])
Parameter | Description |
---|---|
selector | (required) Specifies a string containing a selector expression to match elements against |
context | (required) Specifies a DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead |
Return Value
This form returns a jQuery object.
This method has an alternate form:
.closest(element)
Parameter | Description |
---|---|
element | (required) Specifies an element to match elements against |
Return Value
This form returns a jQuery object.
This method has an alternate form:
.closest(jQuery object)
Parameter | Description |
---|---|
jQuery object | (required) Specifies a jQuery object to match elements against |
Return Value
This form returns a jQuery object.
Description
The .find() method is used to get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
This method has the form:
.find(selector)
Parameter | Description |
---|---|
selector | (required) Specifies a string containing a selector expression to match the current set of elements against |
Return Value
This form returns a jQuery object.
This method has an alternate form:
.find(element)
Parameter | Description |
---|---|
element | (required) Specifies an element to match the elements against |
Return Value
This form returns a jQuery object.
This method has an alternate form:
.find(jQuery object)
Parameter | Description |
---|---|
jQuery object | (required) Specifies a jQuery object to match elements against |
Return Value
This form returns a jQuery object.
Description
The .next() method is used to get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector.
This method has the form:
.next([selector])
Parameter | Description |
---|---|
selector | (optional) Specifies a string containing a selector expression to match elements against |
Return Value
This form returns a jQuery object.
Description
The .nextAll() method is used to get all following siblings of each element in the set of matched elements, optionally filtered by a selector.
This method has the form:
.nextAll([selector])
Parameter | Description |
---|---|
selector | (optional) Specifies a string containing a selector expression to match elements against |
Return Value
This form returns a jQuery object.
Description
The .nextUntil() method is used to get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.
This method has the form:
.nextUntil([selector] [, filter])
Parameter | Description |
---|---|
selector | (optional) Specifies a string containing a selector expression to indicate where to stop matching following sibling elements |
filter | (optional) Specifies a string containing a selector expression to match elements against |
Return Value
This form returns a jQuery object.
This method has an alternate form:
.nextUntil([element] [, filter])
Parameter | Description |
---|---|
element | (required) Specifies a DOM node or jQuery object indicating where to stop matching following sibling elements |
filter | (optional) Specifies a string containing a selector expression to match elements against |
Return Value
This form returns a jQuery object.
Description
The .offsetParent() method is used to get the closest ancestor element that is positioned.
This method has the form:
.offsetParent()
Return Value
This form returns a jQuery object.
Description
The .parent() method is used to get the parent of each element in the current set of matched elements, optionally filtered by a selector.
This method has the form:
.parent([selector])
Parameter | Description |
---|---|
selector | (optional) Specifies a string containing a selector expression to match elements against |
Return Value
This form returns a jQuery object.
Description
The .parents() method is used to get the ancestors of each element in the current set of matched elements, optionally filtered by a selector.
This method has the form:
.parents([selector])
Parameter | Description |
---|---|
selector | (optional) Specifies a string containing a selector expression to match elements against |
Return Value
This form returns a jQuery object.
Description
The .parentsUntil() method is used to get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object.
This method has the form:
.parentsUntil([selector] [, filter])
Parameter | Description |
---|---|
selector | (optional) Specifies a string containing a selector expression to indicate where to stop matching ancestor elements |
filter | (optional) Specifies a string containing a selector expression to match elements against |
Return Value
This form returns a jQuery object.
This method has an alternate form:
.parentsUntil([element] [, filter])
Parameter | Description |
---|---|
element | (required) Specifies a DOM node or jQuery object indicating where to stop matching ancestor elements |
filter | (optional) Specifies a string containing a selector expression to match elements against |
Return Value
This form returns a jQuery object.
Description
The .prev() method is used to get the immediately preceding sibling of each element in the set of matched elements, optionally filtered by a selector.
This method has the form:
.prev([selector])
Parameter | Description |
---|---|
selector | (optional) Specifies a string containing a selector expression to match elements against |
Return Value
This form returns a jQuery object.
Description
The .prevAll() method is used to get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector.
This method has the form:
.prevAll([selector])
Parameter | Description |
---|---|
selector | (optional) Specifies a string containing a selector expression to match elements against |
Return Value
This form returns a jQuery object.
Description
The .prevUntil() method is used to get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.
This method has the form:
.prevUntil([selector] [, filter])
Parameter | Description |
---|---|
selector | (optional) Specifies a string containing a selector expression to indicate where to stop matching sibling elements |
filter | (optional) Specifies a string containing a selector expression to match elements against |
Return Value
This form returns a jQuery object.
This method has an alternate form:
.prevUntil([element] [, filter])
Parameter | Description |
---|---|
element | (required) Specifies a DOM node or jQuery object indicating where to stop matching sibling elements |
filter | (optional) Specifies a string containing a selector expression to match elements against |
Return Value
This form returns a jQuery object.
Description
The .siblings() method is used to get the siblings of each element in the set of matched elements, optionally filtered by a selector.
This method has the form:
.siblings([selector])
Parameter | Description |
---|---|
selector | (optional) Specifies a string containing a selector expression to match elements against |
Return Value
This form returns a jQuery object.