You are on page 1of 28

This document contains text automatically extracted from a PDF or image file.

Formatting may have


been lost and not all text may have been recognized.
To remove this note, right-click and select "Delete table".

jQUERY 1.4.2
VISUAL CHEAT SHEET

❉ SELECTORS / 1. BASIC
All Selector (“*”)
Selects all elements.
a<El(s)>
Class Selector (“.class”)
a<El(s)>
Matches all elements with the given name.
Element Selector (“element”)
Selects all elements with the given tag
name.
a<El(s)>
ID Selector (“#id”)
Selects a single element with the given id
attribute.
a<El>
Multiple Selector (“selector1,
selector2, selectorN”)
Selects the combined results of all the
specified selectors.
a<El(s)>
❉ SELECTORS / 2. HIERARCHY
Child Selector (“parent > child”)
Selects all direct child elements specified
by "child" of elements specified by
"parent".
a<El(s)>
Descendant Selector (“ancestor
descendant”)
Selects all elements that are descendants
of a given ancestor.
a<El(s)>
Next Adjacent Selector (“prev +
next”)
Selects all next elements matching "next"
that are immediately preceded by a sibling
"prev".
a<El(s)>
Next Siblings Selector (“prev ~
siblings”)
Selects all sibling elements that follow
after the "prev" element, have the same
parent, and match the filtering "siblings"
selector.
a<El(s)>
❉ SELECTORS / 3. BASIC FILTER
:animated Selector
Select all elements that are in the progress
of an animation at the time the selector is
run.
a<El(s)>
:eq() Selector
Select the element at index n within the
matched set.
a<El>
:even Selector
a<El(s)>
Selects even elements, zero-indexed

SELECTORS ✼ CORE ✼ ATTRIBUTES ✼ CSS ✼ TRAVERSING ✼ MANIPULATION ✼ EVENTS ✼ EFFECTS ✼


AJAX ✼ UTILITIES
˒ = NEW IN jQUERY 1.4.x / ❉ = DEPRECATED / a = ARRAY / jQ = jQUERY / El = ELEMENT / 0-1 = BOOLEAN /
Obj = OBJECT / NUM = NUMBER / Str = STRING

:first Selector
Selects the first matched element.
a<El>
:gt() Selector
Select all elements at an index greater
than index within the matched set.
a<El(s)>
:header Selector
Selects all elements that are headers, like
h1, h2, h3 and so on.
a<El(s)>
:last Selector
Selects the last matched element.
a<El>
:lt() Selector
Select all elements at an index less than
index within the matched set.
a<El(s)>
:not() Selector
Selects all elements that do not match the
given selector.
a<El(s)>
:odd Selector
Selects odd elements, zero-indexed. See
also even.
a<El(s)>
❉ SELECTORS / 4. CONTENT FILTER
:contains() Selector
Select all elements that contain the
specified text.
a<El(s)>
:empty Selector
Select all elements that have no children
(including text nodes).
a<El(s)>
:has() Selector
Selects elements which contain at least one
element that matches the specified
selector.
a<El(s)>
:parent Selector
Select all elements that are the parent of
another element, including text nodes.
a<El(s)>
❉ SELECTORS / 5. ATTRIBUTE
[name|=value]
Selects elements that have the specified
attribute with a value either equal to a
given string or starting with that string
followed by a hyphen (-).
a<El(s)>
[name*=value]
Selects elements that have the specified
attribute with a value containing the a
given substring.
a<El(s)>
[name~=value]
Selects elements that have the specified
attribute with a value containing a given
word, delimited by spaces.
a<El(s)>

[name$=value]
Selects elements that have the specified
attribute with a value ending exactly with
a given string.
a<El(s)>
[name=value]
Selects all elements that are headers, like
h1, h2, h3 and so on.
a<El(s)>
[name!=value]
Select elements that either don't have the
specified attribute, or do have the specified
attribute but not with a certain value.
a<El(s)>
[name^=value]
Selects elements that have the specified
attribute with a value beginning exactly
with a given string.
a<El(s)>
[name]
Selects elements that have the specified
attribute, with any value.
a<El(s)>
[name=value][name2=value2]
Matches elements that match all of the
specified attribute filters.
a<El(s)>
❉ SELECTORS / 6. CHILD FILTER
:first-child Selector
Selects all elements that are the first child
of their parent.
a<El(s)>
:last-child Selector
Selects all elements that are the last child of
their parent.
a<El(s)>
:nth-child Selector
Selects all elements that are the nth-child of
their parent.
a<El(s)>
:only-child Selector
Selects all elements that are the only child
of their parent.
a<El(s)>
❉ SELECTORS / 7. VISIBILITY FILTER
:hidden Selector
a<El(s)>
Selects all elements that are hidden.
:visible Selector
a<El(s)>
Selects all elements that are visible.
❉ SELECTORS / 8. FORM
:button Selector
Selects all button elements and elements of
type button.
a<El(s)>
:checkbox Selector
a<El(s)>
Selects all elements of type checkbox.

:checked Selector
Matches all elements that are checked.
a<El(s)>
:disabled Selector
a<El(s)>
Selects all elements that are disabled.
:enabled Selector
a<El(s)>
Selects all elements that are enabled.
:file Selector
a<El(s)>
Selects all elements of type file.
:image Selector
a<El(s)>
Selects all elements of type image.
:input Selector
Selects all input, textarea, select and button
elements.
a<El(s)>
:password Selector
a<El(s)>
Selects all elements of type password.
:radio Selector
a<El(s)>
Selects all elements of type radio.
:reset Selector
a<El(s)>
Selects all elements of type reset.
:selected Selector
a<El(s)>
Selects all elements that are selected.
:submit Selector
a<El(s)>
Selects all elements of type submit.
:text Selector
Selects all elements of type text.
a<El(s)>
❉ CORE / 1. THE jQUERY FUNCTION
jQuery()
Accepts a string containing a CSS selector
which is then used to match a set of
elements.
jQ
❉ CORE / 2. OBJECT ACCESSORS
.context
The DOM node context originally passed to
jQuery(); if none was passed then context
will likely be the document.
El
.each( function(index, Element) )
Iterate over a jQuery object, executing a
function for each matched element.
jQ
.get( [ index ] )
Retrieve the DOM elements matched by the
jQuery object.
El | a

.index() ˒
Search for a given element from among the
matched elements.
Num
.length
Num
The number of elements in the jQuery object.
.selector
A selector representing selector originally
passed to jQuery().
Str
.size()
Return the number of DOM elements matched
by the jQuery object.
Num
.toArray() ˒
Retrieve all the DOM elements contained in the
jQuery set, as an array.
a
❉ CORE / 3. DATA
.queue( [ queueName ], newQueue)
Show the queue of functions to be executed on
the matched elements.
jQ
.data( obj ) ˒
Store arbitrary data associated with the
matched elements.
jQ
.removeData( [ name ] )
Remove a previously-stored piece of data.
jQ
.dequeue( [ queueName ] )
Execute the next function on the queue for the
matched elements.
jQ
❉ CORE / 4. PLUGINS
jQuery.fn.extend( object )
Extends the jQuery element set to provide new
methods (used to make a typical jQuery
plugin).
jQ
jQuery.extend( object )
jQ
Extends the jQuery object itself.
❉ CORE / 5. INTEROPERABILITY
jQuery.noConflict( )
Relinquish jQuery's control of the $ variable.
jQ
jQuery.noConflict(extreme)
Extends the jQuery object itself. This is to be
used in an extreme case where you’d like to
embed jQuery into a high-conflict environment.
jQ

OOOO
jQUERY 1.4.2
SELECTORS ✼ CORE ✼ ATTRIBUTES ✼ CSS ✼ TRAVERSING ✼ MANIPULATION ✼ EVENTS ✼ EFFECTS ✼
AJAX ✼ UTILITIES

VISUAL CHEAT SHEET


˒ = NEW IN jQUERY 1.4.x / ❉ = DEPRECATED / a = ARRAY / jQ = jQUERY / El = ELEMENT / 0-1 = BOOLEAN /
Obj = OBJECT / NUM = NUMBER / Str = STRING
❉ ATTRIBUTES / 1. ATTR
❉ ATTRIBUTES / 5. VALUE
.height()
.attr( attributeName )
.val()
Get the current computed height for the first
element in the set of matched elements.
Get the value of an attribute for the first
Obj
Get the current value of the first element in
Str | a
element in the set of matched elements.
the set of matched elements.
.attr( attributeName, value )
.val( value )
Set one or more attributes for the set of
Obj
Set the value of each element in the set of
jQ
matched elements.
matched elements.
.removeAttr()
Remove an attribute from each element in the
set of matched elements.
jQ
❉ CSS / 1. CSS
.css( propertyName )
❉ ATTRIBUTES / 2. CLASS
Get the value of a style property for the first
element in the set of matched elements.
.addClass( class )
Adds the specified class(es) to each of the set of
matched elements.
Str
.css( propertyName, value )
jQ
Set one or more CSS properties for the set of
jQ
matched elements.
.hasClass( class )
Determine whether any of the matched
0-1
❉ CSS / 2. POSITIONING
elements are assigned the given class.
.scrollLeft()
.removeClass( class )
Get the current horizontal position of the
scroll bar for the first element in the set of
Remove a single class, multiple classes, or all
matched elements.
classes from each element in the set of matched
elements.
Int
jQ
.scrollLeft( value )
.toggleClass( class, switch )
Set the current horizontal position of the
scroll bar for each of the set of matched
Add or remove one or more classes from each
elements.
element in the set of matched elements,
depending on either the class's presence or the
value of the switch argument.
jQ
jQ
.offset()
Get the current coordinates of the first
element in the set of matched elements,
relative to the document.
❉ ATTRIBUTES / 3. HTML
.html()
Get the HTML contents of the first element in
the set of matched elements.
Obj
{top, left}
.offset( coordinates )
Set the current coordinates of every element
in the set of matched elements, relative to
the document.
jQ
Str
.position()
.html( htmlString )
Get the current coordinates of the first
Set the HTML contents of each element in the
set of matched elements.
element in the set of matched elements,
relative to the offset parent.
Obj
jQ
{top, left}
.scrollTop()
❉ ATTRIBUTES / 4. TEXT
Get the current vertical position of the scroll
bar for the first element in the set of
.text()
matched elements.
Get the combined text contents of each element
in the set of matched elements, including their
descendants.
Int
Str
.scrollTop( value )
Set the current vertical position of the scroll
bar for each of the set of matched elements.
.text( textString )
Set the content of each element in the set of
matched elements to the specified text.
jQ
❉ CSS / 3. HEIGHT & WIDTH
.height( value )
Set the CSS height of every matched
jQ
element.

Int
.innerHeight()
Get the current computed height for the first
element in the set of matched elements,
including padding but not border.
Int
.innerWidth()
Get the current computed width for the first
element in the set of matched elements,
including padding but not border.
Int
.outerHeight()
Get the current computed height for the first
element in the set of matched elements,
including padding, border, and optionally
margin.
Int
.outerWidth()
Get the current computed width for the first
element in the set of matched elements,
including padding and border.
Int
.width( value )
Set the CSS width of each element in the set of
matched elements.
jQ
.width()
Get the current computed width for the first
element in the set of matched elements.
Int
❉ TRAVERSING / 1. FILTERING
.eq( - index ) ˒
Reduce the set of matched elements to the one at
the specified index.
jQ
.eq( index )
Reduce the set of matched elements to the one at
the specified index.
jQ
.filter( selector )
Reduce the set of matched elements to those that
match the selector or pass the function's test.
jQ
.is( selector )
Check the current matched set of elements
against a selector and return true if at least one
of these elements matches the selector.
0-1
.map( callback(index, domEl) )
Pass each element in the current matched set
through a function, producing a new jQuery
object containing the return values.
jQ
.not()
Remove elements from the set of matched
elements.
jQ
.slice( start, [ end ] )
Reduce the set of matched elements to a subset
specified by a range of indices.
jQ
❉ TRAVERSING / 2. TREE TRAVERSAL
.children( [ selector ] )
Get the children of each element in the set of
matched elements, optionally filtered by a
selector.
jQ
.closest( selector )
Get the first ancestor element that matches the
selector, beginning at the current element and
progressing up through the DOM tree.
jQ
.closest( selectors, [ context ] ) ˒
Get the first ancestor element that matches the
selector, beginning at the current element and
progressing up through the DOM tree.
jQ
.find( selector )
Get the descendants of each element in the
current set of matched elements, filtered by a
selector.
jQ
.next( [ selector ] )
Get the immediately following sibling of each
element in the set of matched elements, optionally
filtered by a selector.
jQ
.nextAll( [ selector ] )
Get all following siblings of each element in the
set of matched elements, optionally filtered by a
selector.
jQ
.nextUntil( [ selector ] )
Get all following siblings of each element up to
but not including the element matched by the
selector.
jQ
.offsetParent()
Get the closest ancestor element that is
positioned.
jQ
.parent( [ selector ] )
Get the parent of each element in the current set
of matched elements, optionally filtered by a
selector.
jQ
.parents( [ selector ] )
Get the ancestors of each element in the current
set of matched elements, optionally filtered by a
selector.
jQ
.parentsUntil( [ selector ] ) ˒
Get the ancestors of each element in the current
set of matched elements, up to but not including
the element matched by the selector.
jQ
.prev( [ selector ] )
Get the immediately preceding sibling of each
element in the set of matched elements, optionally
filtered by a selector.
jQ
.prevAll( [ selector ] )
Get all preceding siblings of each element in the
set of matched elements, optionally filtered by a
selector.
jQ

.prevUntil( [ selector ] ) ˒
Get the ancestors of each element in the current
set of matched elements, optionally filtered by a
selector.
jQ
.siblings( [ selector ] )
Get the siblings of each element in the set of
matched elements, optionally filtered by a
selector.
jQ
❉ TRAVERSING / 2. MISCELLANEOUS
.add()
jQ
Add elements to the set of matched elements.
.add( selectors, [ context ] ) ˒
Add elements to the set of matched elements.
jQ
.andSelf()
Add the previous set of elements on the stack to
the current set.
jQ
.contents()
Get the children of each element in the set of
matched elements, including text nodes.
jQ
.end()
End the most recent filtering operation in the
current chain and return the set of matched
elements to its previous state.
jQ
❉ MANIPULATION / 1. INSIDE
.append( content )
Insert content, specified by the parameter, to the
end of each element in the set of matched
elements.
jQ
.append( function(index, html) ) ˒
Insert content, specified by the parameter, to the
end of each element in the set of matched
elements.
jQ
.appendTo( target )
Insert every element in the set of matched
elements to the end of the target.
jQ
.prepend( content )
Insert content, specified by the parameter, to the
beginning of each element in the set of matched
elements.
jQ
.prependTo( target )
Insert content, specified by the parameter, to the
end of each element in the set of matched
elements.
jQ
jQUERY 1.4.2
VISUAL CHEAT SHEET
˒ = NEW IN jQUERY 1.4.x / ❉ = DEPRECATED / a = ARRAY / jQ = jQUERY / El = ELEMENT / 0-1 = BOOLEAN /
Obj = OBJECT / NUM = NUMBER / Str = STRING
❉ MANIPULATION / 2. OUTSIDE
.replaceWith( function )
.after( content )
Replace each element in the set of matched
elements with the provided new content.
Insert content, specified by the parameter, after
each element in the set of matched elements.
jQ
jQ
.replaceAll()
.after( function(index) ) ˒
A selector expression indicating which element(s)
to replace.
Insert content, specified by the parameter, to the
end of each element in the set of matched
elements.
jQ
jQ
❉ MANIPULATION / 5. REMOVING
.before( content )
.detach( [ selector ] ) ˒
Insert content, specified by the parameter, before
jQ
each element in the set of matched elements.
Remove the set of matched elements from the
DOM.
.before( function ) ˒
Insert content, specified by the parameter, before
each element in the set of matched elements.
jQ
jQ
.empty()
Remove all child nodes of the set of matched
elements from the DOM.
.insertAfter( target )
Insert every element in the set of matched
elements after the target.
jQ
.remove( [ selector ] )
jQ
Remove the set of matched elements from the
DOM.
.insertBefore( target )
Insert every element in the set of matched
elements before the target.
jQ
jQ
❉ MANIPULATION / 6. COPYING
.clone( [ withDataAndEvents ] )
❉ MANIPULATION / 3. AROUND
Create a copy of the set of matched elements.
.unwrap() ˒
Remove the parents of the set of matched
elements from the DOM, leaving the matched
elements in their place.
jQ
❉ EVENTS / 1. DOCUMENT LOADING
jQ
.load( handler(eventObject) )
Bind an event handler to the "load" JavaScript
.wrap( wrappingElement )
event.
Wrap an HTML structure around each element in
the set of matched elements.
jQ
jQ
.ready( handler )
Specify a function to execute when the DOM is
.wrap( wrappingFunction ) ˒
fully loaded.
Wrap an HTML structure around each element in
the set of matched elements.
jQ
jQ
.unload( handler(eventObject) )
Bind an event handler to the "unload" JavaScript
event.
.wrapAll( wrappingElement )
Wrap an HTML structure around all elements in
the set of matched elements.
jQ
jQ
❉ EVENTS / 2. HANDLER ATTACHMENT
.wrapInner( wrappingElement )
.bind( eventType, [ eventData ], handler
Wrap an HTML structure around the content of
jQ
(eventObject) )
each element in the set of matched elements.
Attach a handler to an event for the elements.
.wrapInner( wrappingFunction ) ˒
Wrap an HTML structure around the content of
each element in the set of matched elements.
jQ
jQ
.delegate( selector, eventType,
handler ) ˒
Attach a handler to one or more events for all
elements that match the selector, now or in the
❉ MANIPULATION / 4. REPLACING
future, based on a specific set of root elements.
.replaceWith( newContent )
Replace each element in the set of matched
elements with the provided new content.
jQ
.die() ˒
Remove all event handlers previously attached
using .live() from the elements.
jQ
jQ

SELECTORS ✼ CORE ✼ ATTRIBUTES ✼ CSS ✼ TRAVERSING ✼ MANIPULATION ✼ EVENTS ✼ EFFECTS ✼


AJAX ✼ UTILITIES
.live( eventType, eventData, handler ) ˒
Attach a handler to the event for all elements
which match the current selector, now or in the
future.
Anything
Undefined
jQ
.one( eventType, [ eventData ], handler
(eventObject) )
Attach a handler to an event for the elements.
The handler is executed at most once per
element.
jQ
.trigger( eventType, extraParameters)
Execute all handlers and behaviors attached to
the matched elements for the given event type.
jQ
.triggerHandler( eventType,
extraParameters )
Execute all handlers attached to an element for
an event.
jQ
.unbind( eventType, handler
(eventObject) ) ˒
Remove a previously-attached event handler
from the elements.
jQ
.undelegate()
Remove a handler from the event for all elements
which match the current selector, now or in the
future, based upon a specific set of root elements.
jQ
❉ EVENTS / 3. MOUSE EVENTS
.click( handler(eventObject) )
Bind an event handler to the "click" JavaScript
event, or trigger that event on an element.
jQ
.dblclick( handler(eventObject) )
Bind an event handler to the "dblclick"
JavaScript event, or trigger that event on an
element.
jQ
.focusin( handler(eventObject) )
Bind an event handler to the "focusin" JavaScript
event.
jQ
.focusout( handler(eventObject) )
Bind an event handler to the "focusout"
JavaScript event.
jQ
.hover( handlerIn(eventObject),
handlerOut(eventObject) )
Bind two handlers to the matched elements, to be
executed when the mouse pointer enters and
leaves the elements.
jQ
.hover( handler(eventObject) ) ˒
Bind a single handler to the matched elements, to
be executed when the mouse pointer enters or
leaves the elements.
jQ

.mousedown( handler(eventObject) )
Bind an event handler to the "mousedown"
JavaScript event, or trigger that event on an
element.
jQ
.mouseenter( handler(eventObject) )
Bind an event handler to be fired when the
mouse enters an element, or trigger that handler
on an element.
jQ
.mouseleave( handler(eventObject) )
Bind an event handler to be fired when the
mouse leaves an element, or trigger that handler
on an element.
jQ
.mousemove( handler(eventObject) )
Bind an event handler to the "mousemove"
JavaScript event, or trigger that event on an
element.
jQ
.mouseout( handler(eventObject) )
Bind an event handler to the "mouseout"
JavaScript event, or trigger that event on an
element.
jQ
.mouseover( handler(eventObject) )
Bind an event handler to the "mouseover"
JavaScript event, or trigger that event on an
element.
jQ
.mouseup( handler(eventObject) )
Bind an event handler to the "mouseup"
JavaScript event, or trigger that event on an
element.
jQ
❉ EVENTS / 4. FORM EVENTS
.blur( handler(eventObject) )
Bind an event handler to the "blur" JavaScript
event, or trigger that event on an element.
jQ
.change( handler(eventObject) )
Bind an event handler to the "change"
JavaScript event, or trigger that event on an
element.
jQ
.focus( handler(eventObject) )
Bind an event handler to the "focus" JavaScript
event, or trigger that event on an element.
jQ
.select( handler(eventObject) )
Bind an event handler to the "select" JavaScript
event, or trigger that event on an element.
jQ
.submit( handler(eventObject) )
Bind an event handler to the "submit" JavaScript
event, or trigger that event on an element.
jQ
❉ EVENTS / 5 KEYBOARD EVENTS
.keydown( handler(eventObject) )
Bind an event handler to the "keydown"
JavaScript event, or trigger that event on an
element.
jQ

.keypress( handler(eventObject) )
Bind an event handler to the "keypress"
JavaScript event, or trigger that event on an
element.
jQ
.keyup( handler(eventObject) )
Bind an event handler to the "keyup"
JavaScript event, or trigger that event on an
element.
jQ
❉ EVENTS / 6. EVENT OBJECT
event.currentTarget
The current DOM element within the event
bubbling phase.
El
event.data
Contains the optional data passed to
jQuery.fn.bind when the current executing
handler was bound.
event.isDefaultPrevented()
Returns whether event.preventDefault() was
ever called on this event object.
0-1
event.
isImmediatePropagationStopped()
Returns whether
event.stopImmediatePropagation() was ever
called on this event object.
0-1
event.isPropagationStopped()
Returns whether event.stopPropagation() was
ever called on this event object.
0-1
event.pageX
The mouse position relative to the left edge of
the document.
Num
event.pageY
The mouse position relative to the top edge of
the document.
Num
event.preventDefault()
If this method is called, the default action
of the event will not be triggered.
event.relatedTarget
The other DOM element involved in the event,
if any.
El
event.result
This attribute contains the last value returned
by an event handler that was triggered by this
event, unless the value was undefined.
Obj
event.stopImmediatePropagation()
Prevents other event handlers from being
called.
event.stopPropagation()
Prevents the event from bubbling up the DOM
tree, preventing any parent handlers from
being notified of the event.
jQUERY 1.4.2
VISUAL CHEAT SHEET
˒ = NEW IN jQUERY 1.4.x / ❉ = DEPRECATED / a = ARRAY / jQ = jQUERY / El = ELEMENT / 0-1 = BOOLEAN /
Obj = OBJECT / NUM = NUMBER / Str = STRING
event.target
The DOM element that initiated the event.
El
.fadeOut( [ duration ], [ callback ] )
Hide the matched elements by fading them
event.timeStamp
to transparent.
This attribute returns the number of
milliseconds since January 1, 1970, when the
event is triggered.
jQ
Num
.fadeTo( duration, [ callback ] )
opacity,
Adjust the opacity of the matched elements.
event.type
Describes the nature of the event.
jQ
Str
❉ EFFECTS / 4. CUSTOM
event.which
For key or button events, this attribute
indicates the specific button or key that was
Str
.animate( properties, options )
Perform a custom animation of a set of CSS
pressed.
properties.
❉ EVENTS / 6. BROWSER EVENTS
.error( handler(eventObject) )
Bind an event handler to the "error"
JavaScript event.
jQ
.delay( duration, [ queueName ] )
Set a timer to delay execution of subsequent
items in the queue.
jQ
.stop( [ clearQueue ], [ jumpToEnd ] )
jQ
Stop the currently-running animation on the
matched elements.
.resize( handler(eventObject) )
Bind an event handler to the "resize"
JavaScript event, or trigger that event on an
element.
jQ
jQuery.fx.off
jQ
Globally disable all animations.
0-1
.scroll( handler(eventObject) )
Bind an event handler to the "scroll"
❉ AJAX / 1. LOW-LEVEL INTERFACE
jQ
JavaScript event, or trigger that event on an
element.
jQuery.ajax( settings )
Perform an asynchronous HTTP (Ajax)
request.
❉ EFFECTS / 1. BASIC
.hide( duration, [ callback ] )
Hide the matched elements.
XMLHR
jQuery.ajaxSetup( option )
0-1
Set default values for future Ajax requests.
jQ
.show( duration, [ callback ] )
jQ
❉ AJAX / 2. SHORTHAND METHODS
Display the matched elements.
jQuery.get( url, [ data ], [ callback
(data, textStatus, XMLHttpRequest) ],
❉ EFFECTS / 2. SLIDING
[ dataType ] )
Load data from the server using a HTTP
.slideDown( [ duration ], [ callback ] )
GET request.
Display the matched elements with a sliding
motion.
XMLHR
jQ
jQuery.getJSON( url, [ data ],
.slideToggle( [ duration ], [ callback ] )
Display or hide the matched elements with a
sliding motion.
[ callback(data, textStatus) ] )
Load JSON-encoded data from the server
using a GET HTTP request.
XMLHR
jQ
.slideUp( [ duration ], [ callback ] )
Hide the matched elements with a sliding
motion.
jQ
jQuery.getScript( url, [ success(data,
textStatus) ] )
Load a JavaScript file from the server using
a GET HTTP request, then execute it.
❉ EFFECTS / 3. FADING
.fadeIn( [ duration ], [ callback ] )
Display the matched elements by fading them
to opaque.
XMLHR
.load( url, [ data ], [ complete
(responseText, textStatus,
XMLHttpRequest) ] )
Load data from the server and place the
returned HTML into the matched element.
jQ
jQ

SELECTORS ✼ CORE ✼ ATTRIBUTES ✼ CSS ✼ TRAVERSING ✼ MANIPULATION ✼ EVENTS ✼ EFFECTS ✼


AJAX ✼ UTILITIES
jQuery.post( url, [ data ], [ success
(data, textStatus, XMLHttpRequest) ],
[ dataType ] )
XMLHR
Load data from the server using a HTTP
POST request.
❉ AJAX / 3. AJAX EVENT HANDLERS
.ajaxComplete( handler(event,
XMLHttpRequest, ajaxOptions) )
jQ
Register a handler to be called when Ajax
requests complete.
.ajaxError( handler(event,
XMLHttpRequest, ajaxOptions,
thrownError) )
Register a handler to be called when Ajax
requests complete with an error.
❉ CREDITS
Designed by Antonio Lupetti © 2010
• http://woorkup.com • http://twitter.com/woork
jQuery is © of John Resig and the jQuery Team.
• http://ejohn.org
• http://docs.jquery.com
THE
WORKING
BRAIN
jQ
.ajaxSend( handler(event,
XMLHttpRequest, ajaxOptions) )
Show a message before an Ajax request is
sent.
jQ
.ajaxStart( handler() )
Register a handler to be called when the first
Ajax request begins.
jQ
.ajaxStop( handler() )
Hide a loading message after all the Ajax
requests have stopped.
jQ
.ajaxSuccess( handler(event,
XMLHttpRequest, ajaxOptions) )
Show a message when an Ajax request
completes successfully.
jQ
❉ AJAX / 4. DATA
.serialize()
Encode a set of form elements as a string for
submission.
String
.serializeArray()
Encode a set of form elements as an array of
names and values.
a
❉ UTILITIES / 1. UTILITIES
jQuery.boxModel ✽
States if the current page, in the user's
browser, is being rendered using the W3C
CSS Box Model.
0-1
k

jQuery.browser
Contains flags for the useragent, read from
navigator.userAgent. While jQuery.browser
will not be removed from future versions of
jQuery, every effort to use jQuery.support
and proper feature detection should be made.
Map
jQuery.browser.version
Returns the version number of the rendering
engine for the user's browser.
String
jQuery.contains( container,
contained )
Check to see if a DOM node is within another
DOM node.
0-1
jQuery.each( collection, callback
(indexInArray, valueOfElement) )
Iterates through the array displaying each
number as both a word and numeral
Object
jQuery.extend( target, [ object1 ],
[ objectN ] )
Merge the contents of two or more objects
together into the first object.
Object
jQuery.globalEval( code )
Execute some JavaScript code globally.
jQuery.grep( array, function
(elementOfArray, indexInArray),
[ invert ] )
Finds the elements of an array which satisfy a
filter function. The original array is not
affected.
a
jQuery.inArray( value, array )
Search for a specified value within an array
and return its index (or -1 if not found).
Num
jQuery.isArray( obj )
0-1
Determine whether the argument is an array.
jQuery.isEmptyObject( obj ) ˒
Check to see if an object is empty (contains no
properties).
0-1
jQuery.isFunction( obj )
Determine if the argument passed is a
Javascript function object.
0-1
jQuery.isPlainObject( obj ) ˒
Check to see if an object is a plain object
(created using "{}" or "new Object").
0-1
jQuery.isXMLDoc( node )
Check to see if a DOM node is within an XML
document (or is an XML document).
0-1
jQuery.makeArray( obj )
Convert an array-like object into a true
JavaScript array.
a

jQuery.map( array, callback


(elementOfArray, indexInArray) )
Translate all items in an array or array-
like object to another array of items.
a
jQuery.merge( first, second )
Merge the contents of two arrays together
into the first array.
a
jQuery.noop() ˒
An empty function.
Function
jQuery.parseJSON( json ) ˒
Takes a well-formed JSON string and
returns the resulting JavaScript object.
Object
jQuery.proxy( function, context ) ˒
Takes a function and returns a new one
that will always have a particular context.
Function
jQuery.queue( element,
[ queueName ] )
Show the queue of functions to be executed
on the matched element.
a
jQuery.queue( element,
queueName, newQueue )
Show the queue of functions to be executed
on the matched element.
a
jQuery.removeData( element,
[ name ] )
Remove a previously-stored piece of data.
jQ
jQuery.support
A collection of properties that represent the
presence of different browser features or
bugs.
Object
jQuery.trim( str )
Remove the whitespace from the beginning
and end of a string.
Object
jQuery.unique()
Sorts an array of DOM elements, in place,
with the duplicates removed. Note that this
only works on arrays of DOM elements,
not strings or numbers.
jQ

You might also like