.jquery

A string containing the jQuery version number. The .jquery property is assigned to the jQuery prototype, commonly referred to by its alias $.fn. It is a string containing the version number of jQuery, such as "1.5.0" or "1.4.4". jquery version added: 1.0 Examples: Determine if an object is a

.insertBefore()

Insert every element in the set of matched elements before the target. The .before() and .insertBefore() methods perform the same task. The major difference is in the syntax-specifically, in the placement of the content and target. With .before(), the selector expression preceding the method is the container before which the content is inserted. With .insertBefore(), on the other hand, the content precedes the method, either as a selector expression o

.innerWidth()

Get the current computed inner width for the first element in the set of matched elements, including padding but not border. This method returns the width of the element, including left and right padding, in pixels. This method is not applicable to window and document objects; for these, use .width() instead. figure 1 The number returned by dimensions-related APIs, including .innerWidth(), may be fractional in some cases. Code should not assume it i

:input selector

Selects all input, textarea, select and button elements. The :input selector basically selects all form controls. Because :input is a jQuery extension and not part of the CSS specification, queries using :input cannot take advantage of the performance boost provided by the native DOM querySelectorAll() method. To achieve the best performance when using :input to select elements, first select the elements using a pure CSS selector, then use .filter(":

.is()

Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments. Unlike other filtering methods, .is() does not create a new jQuery object. Instead, it allows you to test the contents of a jQuery object without modification. This is often useful inside callbacks, such as event handlers. Suppose you have a list, with two of its items containing a child

.hover()

Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements. The .hover() method binds handlers for both mouseenter and mouseleave events. You can use it to simply apply behavior to an element during the time the mouse is within the element. Calling $( selector ).hover( handlerIn, handlerOut ) is shorthand for: $( selector ).mouseenter( handlerIn ).mouseleave( handlerOut ); See the discussions for .m

:hidden selector

Selects all elements that are hidden. Elements can be considered hidden for several reasons: They have a CSS display value of none. They are form elements with type="hidden". Their width and height are explicitly set to 0. An ancestor element is hidden, so the element is not shown on the page. Elements with visibility: hidden or opacity: 0 are considered to be visible, since they still consume space in the layout. During animations that hide an elem

jQuery()

Accepts a string containing a CSS selector which is then used to match a set of elements. In the first formulation listed above, jQuery() â which can also be written as $() â searches through the DOM for any elements that match the provided selector and creates a new jQuery object that references these elements: $( "div.foo" ); If no elements match the provided selector, the new jQuery object is "empty"; that is, it contains no elements and has .lengt

.index()

Search for a given element from among the matched elements. Return Values If no argument is passed to the .index() method, the return value is an integer indicating the position of the first element within the jQuery object relative to its sibling elements. If .index() is called on a collection of elements and a DOM element or jQuery object is passed in, .index() returns an integer indicating the position of the passed element relative to the original

ID selector (“#id”)

Selects a single element with the given id attribute. For id selectors, jQuery uses the JavaScript function document.getElementById(), which is extremely efficient. When another selector is attached to the id selector, such as h2#pageTitle, jQuery performs an additional check before identifying the element as a match. Calling jQuery() (or $()) with an id selector as its argument will return a jQuery object containing a collection of either zero or one