You are on page 1of 8

jQUERY 1.

7 CORE SELECTORS ATTRIBUTES TRAVERSING MANIPULATION CSS EVENTS


EFFECTS AJAX UTILITIES CALLBACKS DATA & MISC DEFERRED OBJECT
VISUAL CHEAT SHEET
= NEW OR CHANGED IN jQUERY 1.7 / f(x) = FUNCTION / a = ARRAY / jQ = jQUERY / El = ELEMENT / 0-1 = BOOLEAN / Obj = OBJECT / NUM = NUMBER / Str = STRING

CORE Attribute Ends With Selector [name :empty Selector :last-child Selector
$="value"]
Select all elements that have no children (including text nodes). Selects all elements that are the last child of their parent.
jQuery.holdReady( hold ) u Selects elements that have the specified attribute with a
value ending exactly with a given string. The comparison :enabled Selector :last Selector
Holds or releases the execution of jQuery's ready event. is case sensitive.
Selects all elements that are enabled. Selects the last matched element.
jQuery() jQ Attribute Equals Selector [name="value"]
:eq() Selector :lt() Selector
Accepts a string containing a CSS selector which is then Selects elements that have the specified attribute with a
used to match a set of elements. value exactly equal to a certain value. Select the element at index n within the matched set. Select all elements at an index less than index within the
matched set.
jQuery( selector [, context] ) - jQuery( element )
jQuery( object ) - jQuery( elementArray )
Attribute Not Equal Selector [name! :even Selector
jQuery( jQuery object ) Multiple Attribute Selector [name="value"]
="value"] Selects even elements, zero-indexed. [name2="value2"]
Select elements that either don't have the specified
jQuery.noConflict( [removeAll] ) Obj Matches elements that match all of the specified attribute filters.
attribute, or do have the specified attribute but not with a :file Selector
certain value.
Relinquish jQuery's control of the $ variable. Selects all elements of type file. Multiple Selector (selector1, selector2,
selectorN)
jQuery.sub() jQ
Attribute Starts With Selector :first-child Selector
[name^="value"] Selects the combined results of all the specified selectors.
Creates a new copy of jQuery whose properties and Selects all elements that are the first child of their parent.
methods can be modified without affecting the original Selects elements that have the specified attribute with a
value beginning exactly with a given string. Next Adjacent Selector (prev + next)
jQuery object.
:first Selector
Selects all next elements matching "next" that are immediately
:button Selector Selects the first matched element. preceded by a sibling "prev".
jQuery.when( deferreds ) pr
Selects all button elements and elements of type button.
Provides a way to execute callback functions based on one :focus selector Next Siblings Selector (prev ~ siblings)
or more objects, usually Deferred objects that represent
asynchronous events. Selects element if it is currently focused. Selects all sibling elements that follow after the "prev" element,
:checkbox Selector have the same parent, and match the filtering "siblings"
Selects all elements of type checkbox. selector.
:gt() Selector
Select all elements at an index greater than index within the :not() Selector
SELECTORS :checked Selector matched set.
Selects all elements that do not match the given selector.
Matches all elements that are checked.
All Selector (*) Has Attribute Selector [name]
:nth-child() Selector
Selects all elements. Child Selector (parent > child) Selects elements that have the specified attribute, with any
value. Selects all elements that are the nth-child of their parent.
Selects all direct child elements specified by "child" of
:animated Selector elements specified by "parent".
:has() Selector :odd Selector
Select all elements that are in the progress of an
animation at the time the selector is run. Class Selector (.class) Selects elements which contain at least one element that Selects odd elements, zero-indexed.
matches the specified selector.
Selects all elements with the given class.
:only-child Selector
Attribute Contains Prefix Selector [name| :header Selector
="value"] :contains() Selector Selects all elements that are the only child of their parent.
Selects all elements that are headers, like h1, h2, h3 and so on.
Selects elements that have the specified attribute with a Select all elements that contain the specified text.
value either equal to a given string or starting with that :parent Selector
string followed by a hyphen (-). :hidden Selector
Select all elements that are the parent of another element,
Descendant Selector (ancestor Selects all elements that are hidden. including text nodes.
descendant)
Attribute Contains Selector
[name*="value"] Selects all elements that are descendants of a given ID Selector (#id) :password Selector
ancestor.
Selects elements that have the specified attribute with a Selects a single element with the given id attribute. Selects all elements of type password.
value containing the a given substring.
:disabled Selector
:image Selector :radio Selector
Attribute Contains Word Selector Selects all elements that are disabled.
Selects all elements of type image. Selects all elements of type password.
[name~="value"]
Selects elements that have the specified attribute with a
Element Selector (element) :input Selector :reset Selector
value containing a given word, delimited by spaces. Selects all elements with the given tag name. Selects all input, textarea, select and button elements. Selects all elements of type reset.
jQUERY 1.7 CORE SELECTORS ATTRIBUTES TRAVERSING MANIPULATION CSS EVENTS
EFFECTS AJAX UTILITIES CALLBACKS DATA & MISC DEFERRED OBJECT
VISUAL CHEAT SHEET
= NEW OR CHANGED IN jQUERY 1.7 / f(x) = FUNCTION / a = ARRAY / jQ = jQUERY / El = ELEMENT / 0-1 = BOOLEAN / Obj = OBJECT / NUM = NUMBER / Str = STRING

:selected Selector .removeProp( propertyName ) jQ .filter() jQ .not() jQ

Selects all elements that are selected. Remove a property for the set of matched elements. Reduce the set of matched elements to those that match Remove elements from the set of matched elements.
the selector or pass the function's test.
.not( selector ) - .not( elements ) - .not( function(index) )
:submit Selector .toggleClass( className ) jQ .filter( selector ) - .filter( function(index) )
.filter( element ) - .filter( jQuery object )
Selects all elements of type submit. Add or remove one or more classes from each element in
the set of matched elements, depending on either the .offsetParent() jQ
class's presence or the value of the switch argument. .find( selector ) jQ
:text Selector Get the closest ancestor element that is positioned.

.val() Str Get the descendants of each element in the current set of
Selects all elements of type text. matched elements, filtered by a selector, jQuery object, or
Get the current value of the first element in the set of N element. .parent( [selector] ) jQ
matched elements.
:visible Selector a() .find( selector ) - .find( jQuery object ) - .find( element ) Get the parent of each element in the current set of
.val( value ) - .val( function(index, value) ) matched elements, optionally filtered by a selector.
Selects all elements that are visible. jQ
.first() jQ

Reduce the set of matched elements to the first in the set. .parents( [selector] ) jQ
TRAVERSING
ATTRIBUTES Get the ancestors of each element in the current set of
.has() jQ matched elements, optionally filtered by a selector.
.add() jQ
.addClass() jQ Reduce the set of matched elements to those that have a
Add elements to the set of matched elements. descendant that matches the selector or DOM element.
Adds the specified class(es) to each of the set of matched .parentsUntil() jQ
elements. .add( selector ) - .add( elements ) - .add( html ) .has( selector ) - .has( contained )
Get the ancestors of each element in the current set of
.add( jQuery object ) - .add( selector, context )
.addClass( className ) - .addClass( function(index, matched elements, up to but not including the element
currentClass) ) .is() 0-1 matched by the selector, DOM node, or jQuery object.
.andSelf() jQ
.parentsUntil( [selector] [, filter] )
.attr() Str Add the previous set of elements on the stack to the Check the current matched set of elements against a .parentsUntil( [element] [, filter] )
current set. selector, element, or jQuery object and return true if at
Get the value of an attribute for the first element in the set least one of these elements matches the given arguments.
of matched elements.
.children( [selector] ) jQ .is( selector ) - .is( function(index) ) - .is( jQuery object )
.attr( attributeName ) - .attr( attributeName, value ) .is( element ) .prev( [selector] ) jQ
Get the children of each element in the set of matched
elements, optionally filtered by a selector. Get the immediately preceding sibling of each element in
.last() jQ the set of matched elements, optionally filtered by a
.hasClass( className ) Str
selector.
Determine whether any of the matched elements are .closest() jQ Reduce the set of matched elements to the final one in the
assigned the given class. set.
Get the first element that matches the selector, beginning a()
at the current element and progressing up through the .prevAll( [selector] ) jQ
.html() Str DOM tree. .map( callback(index, domElement) ) jQ
Get all preceding siblings of each element in the set of
jQ .closest( selector ) - .closest( selector [, context] ) Pass each element in the current matched set through a matched elements, optionally filtered by a selector.
Get the HTML contents of the first element in the set of
.closest( jQuery object ) - .closest( element ) function, producing a new jQuery object containing the
matched elements.
.closest( selectors [ , context ] ) return values.
.html( htmlString ) - .html( function(index, oldhtml) )
.prevUntil() jQ
.contents() jQ
.next( [selector] ) jQ Get all preceding siblings of each element up to but not
.prop() Str Get the children of each element in the set of matched including the element matched by the selector, DOM node,
elements, including text and comment nodes. Get the immediately following sibling of each element in
Get the value of a property for the first element in the set jQ or jQuery object.
the set of matched elements. If a selector is provided, it
of matched elements. retrieves the next sibling only if it matches that selector. .prevUntil( [selector] [, filter] )
.prop( propertyName ) - .prop( propertyName, value )
.each( function(index, Element) ) jQ .prevUntil( [element] [, filter] )
Iterate over a jQuery object, executing a function for each .nextAll( [selector] ) jQ
matched element.
.removeAttr( attributeName ) jQ
Get all following siblings of each element in the set of
matched elements, optionally filtered by a selector. .siblings( [selector] ) jQ
Remove an attribute from each element in the set of .end() jQ
matched elements. Get the siblings of each element in the set of matched
End the most recent filtering operation in the current elements, optionally filtered by a selector.
chain and return the set of matched elements to its .nextUntil() jQ
.removeClass() jQ previous state.
Get all following siblings of each element up to but not
including the element matched by the selector, DOM node, .slice( start [, end] ) jQ
Remove a single class, multiple classes, or all classes from
.eq( index ) jQ or jQuery object passed.
each element in the set of matched elements.
Reduce the set of matched elements to a subset specified
Reduce the set of matched elements to the one at the .nextUntil( [selector] [, filter] ) - .nextUntil( [element] [,
.removeClass( [className] ) by a range of indices.
specified index. filter] )
.removeClass( function(index, class) )
jQUERY 1.7 CORE SELECTORS ATTRIBUTES TRAVERSING MANIPULATION CSS EVENTS
EFFECTS AJAX UTILITIES CALLBACKS DATA & MISC DEFERRED OBJECT
VISUAL CHEAT SHEET
= NEW OR CHANGED IN jQUERY 1.7 / f(x) = FUNCTION / a = ARRAY / jQ = jQUERY / El = ELEMENT / 0-1 = BOOLEAN / Obj = OBJECT / NUM = NUMBER / Str = STRING

MANIPULATION .hasClass( className ) Str .remove( [selector] ) Str .val() Str

Determine whether any of the matched elements are Remove the set of matched elements from the DOM. Get the current value of the first element in the set of N
.addClass() jQ assigned the given class. matched elements. a()
Adds the specified class(es) to each of the set of matched .removeAttr( attributeName ) jQ .val( value ) - .val( function(index, value) ) jQ
.html() Str
elements. Remove an attribute from each element in the set of
Get the HTML contents of the first element in the set of jQ matched elements.
.addClass( className ) - .addClass( function(index,
matched elements. .width() Int
currentClass) )
.html( htmlString ) - .html( function(index, oldhtml) ) Get the current computed width for the first element in
.removeClass() jQ
the set of matched elements.
.after() jQ
.innerHeight() Int Remove a single class, multiple classes, or all classes from .width( value ) - .width( function(index, width) )
Insert content, specified by the parameter, after each each element in the set of matched elements.
element in the set of matched elements. Get the current computed height for the first element in
.removeClass( [className] )
the set of matched elements, including padding but not .wrap() jQ
.after( content [, content] ) - .after( function(index) ) .removeClass( function(index, class) )
border.
Wrap an HTML structure around each element in the set
.append() jQ .innerWidth() Int .removeProp( propertyName ) jQ of matched elements.
.wrap( wrappingElement ) - .wrap( function(index) )
Insert content, specified by the parameter, to the end of Get the current computed width for the first element in Remove a property for the set of matched elements.
each element in the set of matched elements. the set of matched elements, including padding but not
border.
.append( content [, content] ) .replaceAll( target ) jQ .wrapAll( wrappingElement ) jQ
.append( function(index, html) )
.insertAfter( target ) Int Replace each target element with the set of matched Wrap an HTML structure around all elements in the set of
elements. matched elements.
.appendTo( target ) jQ Insert every element in the set of matched elements after
the target.
Insert every element in the set of matched elements to the .replaceWith() jQ .wrapInner() jQ
end of the target.
.insertBefore( target ) Int Replace each element in the set of matched elements with Wrap an HTML structure around the content of each
the provided new content. element in the set of matched elements.
.attr() jQ Insert every element in the set of matched elements before
the target. .replaceWith( newContent ) - .replaceWith( function ) .wrapInner( wrappingElement )
Get the value of an attribute for the first element in the set .wrapInner( function(index) )
of matched elements.
.offset() Int
.scrollLeft() jQ
.attr( attributeName ) - .attr( attributeName, value )
Get the current coordinates of the first element in the set
Get the current horizontal position of the scroll bar for the
of matched elements, relative to the document.
first element in the set of matched elements. CSS
.before() jQ .offset( coordinates ) - .offset( function(index, coords) )
.scrollLeft( value )
Insert content, specified by the parameter, before each
element in the set of matched elements. .outerHeight( [includeMargin] ) Int .addClass() jQ
.scrollTop() jQ
.before( content [, content] ) - .before( function ) Get the current computed height for the first element in Adds the specified class(es) to each of the set of matched
the set of matched elements, including padding, border, Get the current vertical position of the scroll bar for the elements.
and optionally margin. Returns an integer (without "px") first element in the set of matched elements.
.clone() jQ .addClass( className ) - .addClass( function(index,
representation of the value or null if called on an empty currentClass) )
.scrollTop value )
Create a deep copy of the set of matched elements. set of elements.
.clone( [withDataAndEvents] )
.clone( [withDataAndEvents] [,deepWithDataAndEvents] ) .position() Obj .text() jQ .css() Str
Get the current coordinates of the first element in the set Get the combined text contents of each element in the set Get the value of a style property for the first element in jQ
.css() Str of matched elements, relative to the offset parent. of matched elements, including their descendants. the set of matched elements.

jQ .text( textString ) - .text( function(index, text) ) .css( propertyName ) - .css( propertyName, value )
Get the value of a style property for the first element in
the set of matched elements.
.prepend( content [, content] ) jQ .css( propertyName, function(index, value) )
.css( map )
.css( propertyName ) - .css( propertyName, value ) Insert content, specified by the parameter, to the .toggleClass() jQ
.css( propertyName, function(index, value) ) beginning of each element in the set of matched elements.
Add or remove one or more classes from each element in
.css( map ) jQuery.cssHooks Obj
the set of matched elements, depending on either the
.prependTo( target ) jQ class's presence or the value of the switch argument.
Hook directly into jQuery to override how particular CSS
.detach( [selector] ) jQ Insert every element in the set of matched elements to the .toggleClass( className ) properties are retrieved or set, normalize CSS property
beginning of the target. .toggleClass( className, switch ) naming, or create custom properties.
Remove the set of matched elements from the DOM.

.prop() Str
.empty() jQ .unwrap() jQ .hasClass( className ) Str
Get the value of a property for the first element in the set jQ
Remove all child nodes of the set of matched elements of matched elements. Remove the parents of the set of matched elements from Determine whether any of the matched elements are
from the DOM. the DOM, leaving the matched elements in their place. assigned the given class.
.prop( propertyName ) - .prop( propertyName, value )
jQUERY 1.7 CORE SELECTORS ATTRIBUTES TRAVERSING MANIPULATION CSS EVENTS
EFFECTS AJAX UTILITIES CALLBACKS DATA & MISC DEFERRED OBJECT
VISUAL CHEAT SHEET
= NEW OR CHANGED IN jQUERY 1.7 / f(x) = FUNCTION / a = ARRAY / jQ = jQUERY / El = ELEMENT / 0-1 = BOOLEAN / Obj = OBJECT / NUM = NUMBER / Str = STRING

.height() Int .toggleClass() jQ .die() jQ event.result Obj

Get the current computed height for the first element in Add or remove one or more classes from each element in Remove all event handlers previously attached The last value returned by an event handler that was
the set of matched elements. the set of matched elements, depending on either the using .live() from the elements. triggered by this event, unless the value was undefined.
class's presence or the value of the switch argument.
.height( value ) .die( eventType [, handler] )
.height( function(index, height) ) .toggleClass( className ) .die( eventTypes ) event.stopImmediatePropagation()
.toggleClass( className, switch )
Prevents other event handlers from being called.
.innerHeight() Int .error() jQ
.width() Int
Get the current computed height for the first element in Bind an event handler to the "error" JavaScript event.
event.stopPropagation()
the set of matched elements, including padding but not Get the current computed width for the first element in
.error( handler(eventObject) )
border. the set of matched elements. Prevents the event from bubbling up the DOM tree,
.error( [eventData], handler(eventObject) )
.width( value ) - .width( function(index, width) ) preventing any parent handlers from being notified of the
event.
.innerWidth() Int event.currentTarget jQ
Get the current computed width for the first element in The current DOM element within the event bubbling
the set of matched elements, including padding but not event.target el
phase.
border. EVENTS The DOM element that initiated the event.
event.data Any
.offset() Int .bind() jQ event.timeStamp N
The optional data passed to jQuery.fn.bind when the
Get the current coordinates of the first element in the set Attach a handler to an event for the elements. current executing handler was bound. The difference in milliseconds between the time the
of matched elements, relative to the document. browser created the event and January 1, 1970.
.bind( eventType [, eventData], handler(eventObject) )
.offset( coordinates ) - .offset( function(index, coords) ) .bind( eventType [, eventData], preventBubble ) event.delegateTarget el
.bind( events )
event.type Str
The element where the currently-called jQuery event
.outerHeight( [includeMargin] ) Int
handler was attached.
.blur() jQ Describes the nature of the event.
Get the current computed height for the first element in
the set of matched elements, including padding, border, Bind an event handler to the "blur" JavaScript event, or event.isDefaultPrevented() 0-1
and optionally margin. Returns an integer (without "px") trigger that event on an element. event.which N
representation of the value or null if called on an empty Returns whether event.preventDefault() was ever called
.blur( handler(eventObject) ) For key or button events, this attribute indicates the
set of elements. on this event object.
.blur( [eventData], handler(eventObject) ) specific button or key that was pressed.

.outerWidth( [includeMargin] ) Int event.isImmediatePropagationStopped() 0-1


.change() jQ .focus() jQ
Get the current computed width for the first element in Returns whether event.stopImmediatePropagation() was
Bind an event handler to the "change" JavaScript event, ever called on this event object. Bind an event handler to the "focus" JavaScript event, or
the set of matched elements, including padding and or trigger that event on an element. trigger that event on an element
border.
.change( handler(eventObject) ) .focus( handler(eventObject) )
event.isPropagationStopped() 0-1
.change( [eventData], handler(eventObject) ) .focus( [eventData], handler(eventObject) )
.position() Obj Returns whether event.stopPropagation() was ever called
Get the current coordinates of the first element in the set on this event object.
.click() jQ
of matched elements, relative to the offset parent. .focusin() jQ
Bind an event handler to the "click" JavaScript event, or event.namespace Str
trigger that event on an element. Bind an event handler to the "focusin" event.
.removeClass() jQ The namespace specified when the event was triggered. .focusin( handler(eventObject) )
.click( handler(eventObject) )
.click( [eventData], handler(eventObject) ) .focusin( [eventData], handler(eventObject) )
Remove a single class, multiple classes, or all classes from
each element in the set of matched elements. event.pageX N
.removeClass( [className] ) .dblclick() jQ The mouse position relative to the left edge of the .focusout() jQ
.removeClass( function(index, class) ) document.
Bind an event handler to the "dblclick" JavaScript event, Bind an event handler to the "focusout" JavaScript event.
or trigger that event on an element.
event.pageY .focusout( handler(eventObject) )
.scrollLeft() Int N
.focusout( [eventData], handler(eventObject) )
.dblclick( handler(eventObject) )
Get the current horizontal position of the scroll bar for the .dblclick( [eventData], handler(eventObject) ) The mouse position relative to the top edge of the
first element in the set of matched elements. document.
.hover() jQ
.scrollLeft( value ) .delegate() jQ
event.preventDefault() u Bind two handlers to the matched elements, to be
Attach a handler to one or more events for all elements executed when the mouse pointer enters and leaves the
.scrollTop() Int that match the selector, now or in the future, based on a If this method is called, the default action of the event will elements.
specific set of root elements. not be triggered.
Get the current vertical position of the scroll bar for the .hover( handlerIn(eventObject)
first element in the set of matched elements. .delegate( selector, eventType, handler ) .handlerOut(eventObject) )
.delegate( selector, eventType, eventData, handler ) event.relatedTarget el .hover( handlerInOut(eventObject) )
.scrollTop( value ) .delegate( selector, events )
The other DOM element involved in the event, if any.
jQUERY 1.7 CORE SELECTORS ATTRIBUTES TRAVERSING MANIPULATION CSS EVENTS
EFFECTS AJAX UTILITIES CALLBACKS DATA & MISC DEFERRED OBJECT
VISUAL CHEAT SHEET
= NEW OR CHANGED IN jQUERY 1.7 / f(x) = FUNCTION / a = ARRAY / jQ = jQUERY / El = ELEMENT / 0-1 = BOOLEAN / Obj = OBJECT / NUM = NUMBER / Str = STRING

.keydown() jQ .mouseout() jQ .scroll() jQ .undelegate() jQ

Bind an event handler to the "keydown" JavaScript event, Bind an event handler to the "mouseout" JavaScript Bind an event handler to the "scroll" JavaScript event, or Remove a handler from the event for all elements which
or trigger that event on an element. event, or trigger that event on an element. trigger that event on an element. match the current selector, based upon a specific set of
root elements.
.keydown( handler(eventObject) ) .mouseout( handler(eventObject) ) .scroll( handler(eventObject) )
.keydown( [eventData], handler(eventObject) ) .mouseout( [eventData], handler(eventObject) ) .scroll( [eventData], handler(eventObject) ) .undelegate( selector, eventType )
.undelegate( selector, eventType, handler )
.undelegate( selector, events )
.keypress() jQ .mouseover() jQ .undelegate( namespace )
.select() jQ
Bind an event handler to the "keypress" JavaScript event, Get the current computed width for the first element in
or trigger that event on an element. Bind an event handler to the "select" JavaScript event, or .unload() jQ
the set of matched elements.
trigger that event on an element.
.keypress( handler(eventObject) ) .mouseover( handler(eventObject) ) Bind an event handler to the "unload" JavaScript event.
.keypress( [eventData], handler(eventObject) ) .select( handler(eventObject) )
.mouseover( [eventData], handler(eventObject) )
.select( [eventData], handler(eventObject) ) .unload( handler(eventObject) )
.unload( [eventData], handler(eventObject) )
.keyup() jQ .mouseup() jQ
Bind an event handler to the "keyup" JavaScript event, or .submit() jQ
Bind an event handler to the "mouseup" JavaScript event,
trigger that event on an element. or trigger that event on an element. Bind an event handler to the "submit" JavaScript event,
.keyup( handler(eventObject) ) or trigger that event on an element. EFFECTS
.mouseup( handler(eventObject) )
.keyup( [eventData], handler(eventObject) ) .mouseup( [eventData], handler(eventObject) ) .submit( handler(eventObject) )
.submit( [eventData], handler(eventObject) ) .animate() jQ
.live() jQ Perform a custom animation of a set of CSS properties.
.off() jQ
Attach an event handler for all elements which match the .animate( properties [, duration] [, easing] [, complete] )
.toggle() jQ
current selector, now and in the future. Remove an event handler. .animate( properties, options )
.live( events, handler ) - .live( events, data, handler ) Bind two or more handlers to the matched elements, to be
.off( events [, selector] [, handler] )
executed on alternate clicks.
.live( events-map ) .off( events-map [, selector] ) .clearQueue( [queueName] ) jQ
handler(eventObject), handler(eventObject) [,
handler(eventObject)] Remove from the queue all items that have not yet been
.load() jQ .on() jQ run.
Bind an event handler to the "load" JavaScript event.
Attach an event handler function for one or more events .delay( duration [, queueName] ) jQ
.load( handler(eventObject) ) to the selected elements. .trigger() jQ
.load( [eventData], handler(eventObject) ) Execute all handlers and behaviors attached to the Set a timer to delay execution of subsequent items in the
.on( events [, selector] [, data], handler ) queue.
.on( events-map [, selector] [, data] ) matched elements for the given event type.
.mousedown() jQ .trigger( eventType, extraParameters )
.dequeue( [queueName] ) jQ
.one() jQ .trigger( event )
Bind an event handler to the "mousedown" JavaScript
event, or trigger that event on an element. Execute the next function on the queue for the matched
Attach a handler to an event for the elements. The elements.
.mousedown( handler(eventObject) ) handler is executed at most once per element.
.triggerHandler() jQ
.mousedown( [eventData], handler(eventObject) ) .one( events [, data], handler ) .fadeIn() jQ
.one( events [, selector] [, data], handler ) Execute all handlers attached to an element for an event.
.one( events-map [, selector] [, data] ) Display the matched elements by fading them to opaque.
.mouseenter() jQ .triggerHandler( eventType, extraParameters )
.fadeIn( [duration] [, callback] )
Bind an event handler to be fired when the mouse enters .fadeIn( [duration] [, easing] [, callback] )
an element, or trigger that handler on an element. jQuery.proxy() jQ
.unbind() jQ
.mouseenter( handler(eventObject) ) Takes a function and returns a new one that will always .fadeOut() jQ
.mouseenter( [eventData], handler(eventObject) ) Remove a previously-attached event handler from the
have a particular context.
elements.
Hide the matched elements by fading them to
jQuery.proxy( function, context ) transparent.
.unbind( [eventType] [, handler(eventObject)] )
.mouseleave() jQ jQuery.proxy( context, name )
.unbind( eventType, false )
.fadeOut( [duration] [, callback] )
Bind an event handler to be fired when the mouse leaves .fadeOut( [duration] [, easing] [, callback] )
an element, or trigger that handler on an element. .ready( handler ) jQ
.mouseleave( handler(eventObject) .undelegate() jQ .fadeTo() jQ
Specify a function to execute when the DOM is fully
.mouseleave( [eventData], handler(eventObject) ) loaded. Remove a handler from the event for all elements which Adjust the opacity of the matched elements.
match the current selector, based upon a specific set of
root elements. .fadeTo( duration, opacity [, callback] )
.mousemove() jQ .resize() jQ .fadeTo( duration, opacity [, easing] [, callback] )
.undelegate( selector, eventType )
Bind an event handler to the "mousemove" JavaScript Bind an event handler to the "resize" JavaScript event, or .undelegate( selector, eventType, handler )
event, or trigger that event on an element. trigger that event on an element. .undelegate( selector, events ) .fadeToggle( [duration] [, easing] [, jQ
.mousemove( handler(eventObject) ) .resize( handler(eventObject) )
.undelegate( namespace ) callback] )
.mousemove( [eventData], handler(eventObject) ) .resize( [eventData], handler(eventObject) ) Display or hide the matched elements by animating their
opacity.
jQUERY 1.7 CORE SELECTORS ATTRIBUTES TRAVERSING MANIPULATION CSS EVENTS
EFFECTS AJAX UTILITIES CALLBACKS DATA & MISC DEFERRED OBJECT
VISUAL CHEAT SHEET
= NEW OR CHANGED IN jQUERY 1.7 / f(x) = FUNCTION / a = ARRAY / jQ = jQUERY / El = ELEMENT / 0-1 = BOOLEAN / Obj = OBJECT / NUM = NUMBER / Str = STRING

jQuery.fx.interval N AJAX jQuery.getJSON() jqXHR jQuery.contains( container, contained ) 0-1

The rate (in milliseconds) at which animations fire. Load JSON-encoded data from the server using a Check to see if a DOM element is within another DOM
jQuery.ajax() jqXHR GET HTTP request. element.
jQuery.fx.off 0-1 Perform an asynchronous HTTP (Ajax) request. jQuery.getJSON( url [, data] [, success(data,
textStatus, jqXHR)] ) jQuery.data() Obj
Globally disable all animations. jQuery.ajax( url [, settings] )
jQuery.ajax( settings ) Store arbitrary data associated with the specified
jQuery.getScript() jqXHR element. Returns the value that was set.
.hide() jQ
.ajaxComplete() jQ
Load a JavaScript file from the server using a GET jQuery.data( element , key , value )
Hide the matched elements. HTTP request, then execute it. jQuery.data( element, key )
Register a handler to be called when Ajax requests
jQuery.data( element )
.hide( duration [, callback] ) complete. This is an Ajax Event. jQuery.getScript( url [, success(data, textStatus)] )
.hide( [duration] [, easing] [, callback] )
.ajaxComplete( handler(event, XMLHttpRequest,
ajaxOptions) ) .dequeue( [queueName] ) jQ
.load() jqXHR
.queue() a() Execute the next function on the queue for the matched
.ajaxError() jQ Load data from the server and place the returned elements.
Show the queue of functions to be executed on the jQ HTML into the matched element.
matched elements. Register a handler to be called when Ajax requests
complete with an error. This is an Ajax Event. .load( url [, data] [, complete(responseText, jQuery.each() Obj
.queue( [queueName] ) textStatus, XMLHttpRequest)] )
.queue( [queueName] , newQueue ) .ajaxError( handler(event, jqXHR, ajaxSettings, A generic iterator function, which can be used to
.queue( [queueName] , callback( next ) ) thrownError) ) seamlessly iterate over both objects and arrays.
jQuery.param() Str
jQuery.each( collection, callback(indexInArray,
.show() jQ jQuery.ajaxPrefilter() u Create a serialized representation of an array or valueOfElement) )
object, suitable for use in a URL query string or Ajax
Display the matched elements. Handle custom Ajax options or modify existing
request.
options before each request is sent and before they jQuery.extend() Obj
.show( duration [, callback] ) are processed by $.ajax(). jQuery.param( obj )
.show( [duration] [, easing] [, callback] ) jQuery.param( obj, traditional ) Merge the contents of two or more objects together into
jQuery.ajaxPrefilter( [dataTypes] , handler(options, the first object.
originalOptions, jqXHR) )
jQuery.extend( target [, object1] [, objectN] )
.slideDown() jQ jQuery.post() jqXHR jQuery.extend( [deep], target, object1 [, objectN] )
Display the matched elements with a sliding motion. .ajaxSend() jQ
Load data from the server using a HTTP POST
.slideDown( [duration] [, callback] ) Attach a function to be executed before an Ajax request. jQuery.globalEval( code )
.slideDown( [duration] [, easing] [, callback] ) request is sent. This is an Ajax Event. jQuery.post( url [, data] [, success(data, textStatus, Execute some JavaScript code globally.
.ajaxSend( handler(event, jqXHR, ajaxOptions) ) jqXHR)] [, dataType] )
jQuery.each( collection, callback(indexInArray,
.slideToggle() jQ valueOfElement) )
jQuery.ajaxSetup( options ) .serialize() Str
Display or hide the matched elements with a sliding
motion. Set default values for future Ajax requests. Encode a set of form elements as a string for jQuery.grep() a()
.slideToggle( [duration] [, callback] ) submission.
Finds the elements of an array which satisfy a filter
.slideToggle( [duration] [, easing] [, callback] ) .ajaxStart( handler() ) jQ
function. The original array is not affected.
Register a handler to be called when the first Ajax .serializeArray() a()
jQuery.grep( array, function(elementOfArray,
.slideUp() jQ request begins. This is an Ajax Event. indexInArray) [, invert] )
Encode a set of form elements as an array of names
and values.
Hide the matched elements with a sliding motion.
.ajaxStop( handler() ) jQ
jQuery.inArray() N
.slideUp( [duration] [, callback] )
.slideUp( [duration] [, easing] [, callback] ) Register a handler to be called when all Ajax requests
Search for a specified value within an array and return
have completed. This is an Ajax Event.
its index (or -1 if not found).
UTILITIES
.stop() jQ .ajaxSuccess() jQ jQuery.inArray( value, array [, fromIndex] )

Stop the currently-running animation on the matched Attach a function to be executed whenever an Ajax jQuery.boxModel 0-1
request completes successfully. This is an Ajax Event. jQuery.isArray( obj ) 0-1
elements.
Deprecated Determine whether the argument is an array.
.stop( [clearQueue] [, jumpToEnd] ) .ajaxSuccess( handler(event, XMLHttpRequest,
.stop( [queue] [, clearQueue] [, jumpToEnd] ) ajaxOptions) )
jQuery.browser Map jQuery.isEmptyObject( object ) 0-1
.toggle() jQ
jQuery.get() jqXHR Deprecated Check to see if an object is empty (contains no properties).
Load data from the server using a HTTP GET
Display or hide the matched elements.
request. .clearQueue( [queueName] ) jQ jQuery.isFunction( object ) 0-1
.toggle( [duration] [, callback] )
jQuery.get( url [, data] [, success(data, textStatus, Remove from the queue all items that have not yet
.toggle( [duration] [, easing] [, callback] ) Determine if the argument passed is a Javascript function
jqXHR)] [, dataType] ) been run.
.toggle( showOrHide ) object.
jQUERY 1.7 CORE SELECTORS ATTRIBUTES TRAVERSING MANIPULATION CSS EVENTS
EFFECTS AJAX UTILITIES CALLBACKS DATA & MISC DEFERRED OBJECT
VISUAL CHEAT SHEET
= NEW OR CHANGED IN jQUERY 1.7 / f(x) = FUNCTION / a = ARRAY / jQ = jQUERY / El = ELEMENT / 0-1 = BOOLEAN / Obj = OBJECT / NUM = NUMBER / Str = STRING

jQuery.isNumeric( object ) 0-1 .queue() a() callbacks.fired() 0-1 .get( [index] ) el

Show the queue of functions to be executed on the jQ Retrieve the DOM elements matched by the jQuery a()
Determines whether its argument is a number. Determine if the callbacks have already been called at
matched elements. object.
least once.
.queue( [queueName] ) .each( function(index, Element) )
jQuery.isPlainObject( object ) 0-1 .queue( [queueName] , newQueue )
.queue( [queueName] , callback( next ) ) callbacks.fireWith() u
Check to see if an object is a plain object (created .index Num
using "{}" or "new Object").
Call all callbacks in a list with the given context and Search for a given element from among the matched
jQuery.removeData() jQ arguments. elements.
jQuery.isWindow( object ) 0-1
Remove a previously-stored piece of data callbacks.fireWith( [context] [, args] ) .index( selector ), .index( element )
Determine whether the argument is a window.
jQuery.removeData( element [, name] )
0-1 jQuery.noConflict( [removeAll] ) Obj
jQuery.isXMLDoc( object ) 0-1 callbacks.has( callback )
jQuery.support obj Relinquish jQuery's control of the $ variable.
Check to see if a DOM node is within an XML Determine whether a supplied callback is in a list.
document (or is an XML document). A collection of properties that represent the presence of .size() Num
different browser features or bugs.
callbacks.lock() u
jQuery.makeArray( object ) a() Return the number of elements in the jQuery object.

Convert an array-like object into a true JavaScript jQuery.trim( str ) Str Lock a callback list in its current state.
array. .toArray() a()
Remove the whitespace from the beginning and end of
a string. Retrieve all the DOM elements contained in the jQuery
callbacks.locked() 0-1
jQuery.map() a() set, as an array.

Translate all items in an array or object to new Determine if the callbacks list has been locked.
jQuery.type( obj ) Str
array of items.
jQuery.map( array, callback(elementOfArray, Determine the internal JavaScript [[Class]] of an DEFERRED
object. callbacks.remove( callback ) u
indexInArray) )
jQuery.map( arrayOrObject, callback( value,
Remove a callback or a collection of callbacks from a deferred.always() def
indexOrKey ) )
jQuery.unique( array ) a() callback list.
Add handlers to be called when the Deferred object is
jQuery.merge( first, second ) a() Sorts an array of DOM elements, in place, with the either resolved or rejected.
duplicates removed. Note that this only works on
Merge the contents of two arrays together into the arrays of DOM elements, not strings or numbers. deferred.always( alwaysCallbacks [, alwaysCallbacks] )
first array. DATA & MISCELLANEOUS
deferred.done() def
jQuery.noop() f(x) .data() jQ
CALLBACKS OBJECT Add handlers to be called when the Deferred object is
An empty function. Store arbitrary data associated with the matched resolved.
elements.
deferred.done( doneCallbacks [, doneCallbacks] )
jQuery.now() N jQuery.Callbacks( flag ) data( key , value ), data( key )
Return a number representing the current time.
A multi-purpose callbacks list object that provides a deferred.fail() def
powerful way to manage callback lists. jQuery.dequeue() jQ
jQuery.parseJSON( json ) Obj Add handlers to be called when the Deferred object is
Execute the next function on the queue for the matched rejected.
Takes a well-formed JSON string and returns the callbacks.add( callbacks ) u element.
resulting JavaScript object. deferred.fail( failCallbacks [, failCallbacks] )
jQuery.dequeue( element [, queueName] )
Add a callback or a collection of callbacks to a callback
jQuery.parseXML( data ) XMLdoc list. deferred.isRejected() 0-1
jQuery.hasData( element ) 0-1
Parses a string into an XML document. Determine whether a Deferred object has been rejected.
u Determine whether an element has any jQuery data
callbacks.disable()
associated with it.
jQuery.proxy() f(x)
Disable a callback list from doing anything more.
Takes a function and returns a new one that will jQ
always have a particular context.
.removeData() deferred.isResolved() 0-1
callbacks.empty() u Determine whether a Deferred object has been resolved.
jQuery.proxy( function, context ) Remove a previously-stored piece of data.
jQuery.proxy( context, name )
Remove all of the callbacks from a list. .removeData( [name] ), .removeData( [list] )

jQuery.queue() a()
.each() jQ deferred.notify( args ) 0-1
jQ callbacks.fire( arguments ) u
Takes a function and returns a new one that will
always have a particular context. Iterate over a jQuery object, executing a function for each Call the progressCallbacks on a Deferred object with the
Call all of the callbacks with the given arguments matched element. given args.
jQuery.queue( element [ , queueName ] )
jQuery.queue( element , queueName , newQueue ) .each( function(index, Element) )
jQUERY 1.7 CORE SELECTORS ATTRIBUTES TRAVERSING MANIPULATION CSS EVENTS
EFFECTS AJAX UTILITIES CALLBACKS DATA & MISC DEFERRED OBJECT
VISUAL CHEAT SHEET
= NEW OR CHANGED IN jQUERY 1.7 / f(x) = FUNCTION / a = ARRAY / jQ = jQUERY / El = ELEMENT / 0-1 = BOOLEAN / Obj = OBJECT / NUM = NUMBER / Str = STRING

deferred.notifyWith() def .promise() promise New or Changed in jQuery 1.7.1 About jQuery
Call the progressCallbacks on a Deferred object Return a Promise object to observe when all WHATS NEW? THE WRITE LESS, DO MORE, JAVASCRIPT LIBRARY
with the given context and args. actions of a certain type bound to the collection,
queued or not, have finished. Aspects of the API that were changed in the corresponding version of jQuery is a fast and concise JavaScript Library that simplifies
deferred.notifyWith( context [, args] )
jQuery. API changes in jQuery 1.7.0 dealt primarily with the new Event HTML document traversing, event handling, animating, and
.promise( [type] [, target] )
APIs: .on() and .off() Ajax interactions for rapid web development. jQuery is designed
to change the way that you write JavaScript.
deferred.pipe() promise jQuery.when( deferreds ) promise Better Support for HTML5 in IE6/7/8

Utility method to filter and/or chain Deferreds. Provides a way to execute callback functions based jQuery.Callbacks()
jQuery Official Web Site http://jquery.com
deferred.pipe( [doneFilter] [, failFilter] ) on one or more objects, usually Deferred objects Toggling Animations Work Intuitively
deferred.pipe( [doneFilter] [, failFilter] [, that represent asynchronous events. Download http://docs.jquery.com/Downloading_jQuery
progressFilter] ) Documentation http://docs.jquery.com/Main_Page
jQuery.Callbacks() Tutorials http://docs.jquery.com/Tutorials
deferred.progress() def callbacks.add() Bug Traker http://bugs.jquery.com/newticket
callbacks.disable()
Add handlers to be called when the Deferred object Discussion http://docs.jquery.com/Discussion
generates progress notifications. callbacks.empty()

deferred.progress( progressCallbacks ) callbacks.fire()


callbacks.fired()
callbacks.fireWith() Credits
deferred.promise() promise
callbacks.has() JQUERY 1.7 VISUAL CHEAT SHEET
Return a Deferred's Promise object. callbacks.lock() This jQuery visual cheat sheet is designed by Antonio Lupetti and
deferred.promise( [target] ) callbacks.locked() is distributed for free.
callbacks.remove()
deferred.reject( args ) def deferred.notify() Update as of december 2011, jQuery current release v 1.7.1
Reject a Deferred object and call any failCallbacks deferred.notifyWith()
with the given args. deferred.pipe()
My Blog http://woorkup.com
deferred.progress()
Twitter @woork - http://twitter.com/woork
deferred.rejectWith() def deferred.state()
Facebook http://facebook.com/antoniolupetti
Reject a Deferred object and call any failCallbacks deferred.then()
with the given context and args. Google+ https://plus.google.com/u/0/112930363515083491757
event.delegateTarget
deferred.rejectWith( context [, args] ) .is()
jQuery.isNumeric()

deferred.resolve( args ) def .off()


.on()
Resolve a Deferred object and call any
doneCallbacks with the given args. .removeAttr()
.removeData()
.stop()
deferred.resolveWith() def

Resolve a Deferred object and call any


doneCallbacks with the given args.
deferred.resolveWith( context [, args] )

deferred.state() Str

Determine the current state of a Deferred object.

deferred.then() def

Add handlers to be called when the Deferred object


is resolved or rejected.
deferred.then( doneCallbacks, failCallbacks )
deferred.then( doneCallbacks, failCallbacks [,
progressCallbacks] )

You might also like