:nth-last-child() selector

Selects all elements that are the nth-child of their parent, counting from the last element to the first. Because jQuery's implementation of :nth- selectors is strictly derived from the CSS specification, the value of n is "1-indexed", meaning that the counting starts at 1. For other selector expressions such as :eq() or :even jQuery follows JavaScript's "0-indexed" counting. Given a single <ul> containing three <li>s, $( "li:nth-last-chil

.offset()

Get the current coordinates of the first element in the set of matched elements, relative to the document. The .offset() method allows us to retrieve the current position of an element relative to the document. Contrast this with .position(), which retrieves the current position relative to the offset parent. When positioning a new element on top of an existing one for global manipulation (in particular, for implementing drag-and-drop), .offset() is m

.nextUntil()

Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed. Given a selector expression that represents a set of DOM elements, the .nextUntil() method searches through the successors 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 following siblings up to but not inc

:not() selector

Selects all elements that do not match the given selector. All selectors are accepted inside :not(), for example: :not(div a) and :not(div,a). Additional Notes The .not() method will end up providing you with more readable selections than pushing complex selectors or variables into a :not() selector filter. In most cases, it is a better choice. jQuery( ":not(selector)" ) version added: 1.0

:nth-child() selector

Selects all elements that are the nth-child of their parent. Because jQuery's implementation of :nth- selectors is strictly derived from the CSS specification, the value of n is "1-indexed", meaning that the counting starts at 1. For other selector expressions such as :eq() or :even jQuery follows JavaScript's "0-indexed" counting. Given a single <ul> containing two <li>s, $( "li:nth-child(1)" ) selects the first <li> while $( "li:eq

.nextAll()

Get all following siblings of each element in the set of matched elements, optionally filtered by a selector. Given a jQuery object that represents a set of DOM elements, the .nextAll() method allows us to search through the successors of these elements in the DOM tree and construct a new jQuery object from the matching elements. The method optionally accepts a selector expression of the same type that we can pass to the $() function. If the selector

Next siblings selector (“prev ~ siblings”)

Selects all sibling elements that follow after the "prev" element, have the same parent, and match the filtering "siblings" selector. The notable difference between (prev + next) and (prev ~ siblings) is their respective reach. While the former reaches only to the immediately following sibling element, the latter extends that reach to all following sibling elements. jQuery( "prev ~ siblings" )

Next adjacent selector (“prev + next”)

Selects all next elements matching "next" that are immediately preceded by a sibling "prev". One important point to consider with both the next adjacent sibling selector (prev + next) and the general sibling selector (prev ~ siblings) is that the elements on either side of the combinator must share the same parent. jQuery( "prev + next" ) version added: 1.0

.next()

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. Given a jQuery object that represents a set of DOM elements, the .next() method allows us to search through the immediately following sibling of these elements in the DOM tree and construct a new jQuery object from the matching elements. The method optionally accepts a selector

Multiple selector (“selector1, selector2, selectorN”)

Selects the combined results of all the specified selectors. 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. jQuery( "selector1, sele