.andSelf()

Add the previous set of elements on the stack to the current set. Note: This function has been deprecated and is now an alias for .addBack(), which should be used with jQuery 1.8 and later. As described in the discussion for .end(), jQuery objects maintain an internal stack that keeps track of changes to the matched set of elements. When one of the DOM traversal methods is called, the new set of elements is pushed onto the stack. If the previous set o

:enabled selector

Selects all elements that are enabled. 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 $( ":enabled" ) is equivalent to $( "*:enabled" ), so $( "input:enabled" ) or similar should be used instead. Although their resulting selections are usually the same, :enabled selector is subtly d

Has attribute selector [name]

Selects elements that have the specified attribute, with any value. jQuery( "[attribute]" ) version added: 1.0 Examples: Bind a single click to divs with an id that adds the id to the div's text. <!doctype html> <html lang="en"> <head> <meta charset="utf-8"&g

.replaceWith()

Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed. The .replaceWith() method removes content from the DOM and inserts new content in its place with a single call. Consider this DOM structure: <div class="container"> <div class="inner first">Hello</div> <div class="inner second">And</div> <div class="inner third">Goodbye</div>

Bounce effect

The bounce effect bounces an element. When used with hide or show, the last or first bounce will also fade in/out. bounce distance (default: 20) Number The distance of the largest "bounce" in pixels. times (default: 5)

.hasClass()

Determine whether any of the matched elements are assigned the given class. Elements may have more than one class assigned to them. In HTML, this is represented by separating the class names with a space: <div id="mydiv" class="foo bar"></div> The .hasClass() method will return true if the class is assigned to an element, even if other classes also are. For example, given the HTML above, the following will return true: $( "#mydiv" ).hasCla

.detach()

Remove the set of matched elements from the DOM. The .detach() method is the same as .remove(), except that .detach() keeps all jQuery data associated with the removed elements. This method is useful when removed elements are to be reinserted into the DOM at a later time. .detach( [selector ] ) version added: 1.4 selector

.contextmenu()

Bind an event handler to the "contextmenu" JavaScript event, or trigger that event on an element. This method is a shortcut for .on( "contextmenu", handler ) in the first two variations, and .trigger( "contextmenu" ) in the third. The contextmenu event is sent to an element when the right button of the mouse is clicked on it, but before the context menu is displayed. In case the context menu key is pressed, the event is triggered on the html element.

jQuery.isEmptyObject()

Check to see if an object is empty (contains no enumerable properties). As of jQuery 1.4 this method checks both properties on the object itself and properties inherited from prototypes (in that it doesn't use hasOwnProperty). The argument should always be a plain JavaScript Object as other types of object (DOM elements, primitive strings/numbers, host objects) may not give consistent results across browsers. To determine if an object is a plain JavaS

event.which

For key or mouse events, this property indicates the specific key or button that was pressed. The event.which property normalizes event.keyCode and event.charCode. It is recommended to watch event.which for keyboard key input. For more detail, read about event.charCode on the MDN. event.which also normalizes button presses (mousedown and mouseupevents), reporting 1 for left button, 2 for middle, and 3 for right. Use event.which instead of event.butto