Documentation

API/1.1.2/Core

From jQuery JavaScript Library

Jump to: navigation, search

This is an old version of the Core API:
View the Current API

NameType
$(...) The jQuery Function:

NameType
jQuery( expression, context )Returns: jQuery
This function accepts a string containing a CSS selector which is then used to match a set of elements.
jQuery( html, ownerDocument )Returns: jQuery
Create DOM elements on-the-fly from the provided String of raw HTML.
jQuery( elements )Returns: jQuery
Wrap jQuery functionality around a single or multiple DOM Element(s).
jQuery( callback )Returns: jQuery
A shorthand for $(document).ready().
jQuery Object Accessors:



NameType
each( callback )Returns: jQuery
Execute a function within the context of every matched element.
size( )Returns: Number
The number of elements in the jQuery object.
lengthReturns: Number
The number of elements in the jQuery object.
eq( position )Returns: jQuery
Reduce the set of matched elements to a single element.
gt( position )Returns: jQuery
Reduce the set of matched elements to all elements after a given position.
lt( position )Returns: jQuery
Reduce the set of matched elements to all elements before a given position.
get( )Returns: Array<Element>
Access all matched DOM elements.
get( index )Returns: Element
Access a single matched DOM element at a specified index in the matched set.
index( subject )Returns: Number
Searches every matched element for the object and returns the index of the element, if found, starting with zero. If a jQuery object is passed, only the first element is checked.
Plugins:

NameType
jQuery.fn.extend( object )Returns: jQuery
Extends the jQuery element set to provide new methods (used to make a typical jQuery plugin).
jQuery.extend( object )Returns: jQuery
Extends the jQuery object itself.
Interoperability:

NameType
jQuery.noConflict( )Returns: jQuery
Run this function to give control of the $ variable back to whichever library first implemented it.
jQuery.noConflict( extreme )Returns: jQuery
Revert control of both the $ and jQuery variables to their original owners. Use with discretion.