:password selector

Selects all elements of type password. $( ":password" ) is equivalent to $( "[type=password]" ). As with other pseudo-class selectors (those that begin with a ":") it is recommended to precede it with a tag name or some other selector; otherwise, the universal selector ( "*" ) is implied. In other words, the bare $( ":password" ) is equivalent to $( "*:password" ), so $( "input:password" ) should be used instead. Because :password is a jQuery extens

.prev()

Get the immediately preceding sibling 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 .prev() method searches for the predecessor of each of these elements in the DOM tree and constructs a new jQuery object from the matching elements. The method optionally accepts a selector expression of the same type that can be passed to the $() function. If the sele

.parents()

Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector. Given a jQuery object that represents a set of DOM elements, the .parents() method allows us to search through the ancestors of these elements in the DOM tree and construct a new jQuery object from the matching elements ordered from immediate parent on up; the elements are returned in order from the closest parent to the outer ones. When multip

.prop()

Get the value of a property for the first element in the set of matched elements. The .prop() method gets the property value for only the first element in the matched set. It returns undefined for the value of a property that has not been set, or if the matched set has no elements. To get the value for each element individually, use a looping construct such as jQuery's .each() or .map() method. Note: Attempting to change the type property (or attribu

.prepend()

Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. The .prepend() method inserts the specified content as the first child of each element in the jQuery collection (To insert it as the last child, use .append()). The .prepend() and .prependTo() methods perform the same task. The major difference is in the syntaxâspecifically, in the placement of the content and target. With .prepend(), the sele

:parent selector

Select all elements that have at least one child node (either an element or text). This is the inverse of :empty. One important thing to note regarding the use of :parent (and :empty) is that child nodes include text nodes. The W3C recommends that the <p> element have at least one child node, even if that child is merely text (see http://www.w3.org/TR/html401/struct/text.html#edef-P). Some other elements, on the other hand, are empty (i.e. have

.parentsUntil()

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. Given a selector expression that represents a set of DOM elements, the .parentsUntil() method traverses through the ancestors of these elements until it reaches an element matched by the selector passed in the method's argument. The resulting jQuery object contains all of the ancestors up to

.outerHeight()

Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns a number (without "px") representation of the value or null if called on an empty set of elements. The top and bottom padding and border are always included in the .outerHeight() calculation; if the includeMargin argument is set to true, the margin (top and bottom) is also included. This method is not applicab

.outerWidth()

Get the current computed width for the first element in the set of matched elements, including padding and border. Returns the width of the element, along with left and right padding, border, and optionally margin, in pixels. If includeMargin is omitted or false, the padding and border are included in the calculation; if true, the margin is also included. This method is not applicable to window and document objects; for these, use .width() instead. Al

:only-of-type selector

Selects all elements that have no siblings with the same element name. If the parent has other child elements with the same element name, nothing is matched. jQuery( ":only-of-type" ) version added: 1.9 Examples: Change the text and add a border for each button that is the only child button