Jquery 1.4.4 Api Cheat Sheet

ADVERTISEMENT

Selectors
Core
Traversing
Events
AJAX
Basics
Hierarchy
jQuery function
Filtering
Page Load
Low-Level Interface
#id
ancestor
$
.jQuery( selector [, context]
),
.jQuery( element
),
$
.eq( index )
$
.ready( fn() )
XHR
jQuery.ajax( options )
descendant
.jQuery( elementArray
element
),
.first( )
$
1.4+
async = true
beforeSend( XHR )
Event Handling
bool
fn
.jQuery( jQueryObject
.jQuery( )
parent > child
),
1.4∗ ∗
.class,
.last( )
$
1.4+
cache = true
complete(XHR, status)
bool
fn
.bind( type [, data ], fn(eventObj) )
$
$
.jQuery( html [, ownerDocument]
),
.class.class
prev + next
$
.has( selector
),
str
contentType
obj
context
.bind( type [, data], false )
$
1.4∗ ∗
.jQuery( html, props )
1.4∗ ∗
*
prev ~ siblings
.has( element )
data
dataFilter( data, type )
1.4+
obj, str
fn
$
.bind( array )
1.4∗ ∗
.jQuery( fn )
$
global = true
ifModified = false
selector1,
.filter( selector
.filter( fn(index) )
bool
bool
$
),
.unbind( [type] [, fn])
$
str
jsonp
fn
jsonpCallback
selector2
.is( selector )
jQuery Object Accessors
bool
.one( type [, data ], fn(eventObj) )
$
password
processData = true
str
bool
$
.map( fn(index, element) )
$
.each( fn(index, element) )
.trigger( event [, data])
$
timeout
type = 'GET'
Basic Filters
Content Filters
num
str
.not( selector
.not( elements
$
),
),
num
.size( )
obj
.triggerHandler( event [, data])
str
url = curr. page
str
username
:first
:contains(text)
.not( fn( index ) )
, .length
xhr
scriptCharset
.delegate( selector, type, [data], handler)
fn
str
$
1.4+
:last
:empty
$
.slice( start [, end] )
str
.selector
dataType ∈ {xml, json, script, html}
str
.undelegate( [selector, type, [handler]])
$
1.4+
:not(selector)
:has(selector)
.context
el
error( XHR, status, errorThrown )
Tree traversal
fn
:even
:parent
Live Events
.eq( index )
success( data, status, XHR )
$
fn
.children( [selector] )
$
:odd
$
.live( eventType [, data], fn() )
jQuery.error( str )
jQuery.ajaxSetup( options )
1.4+
.closest( selector [, context] )
$
1.4∗ ∗
Visibility
:eq(index)
.die( )
.die( [eventType] [, fn() ])
$
1.4+,
[el],el
.get( [index] )
arr
.closest( selectors [, context] )
1.4+
Shorthand Methods
Filters
:gt(index)
.index( )
.index( selector )
num
1.4∗
1.4∗
Interaction Helpers
.find( selector )
∗,
∗,
$
.load( url [, data] [, fn( responseText, status, XHR )] )
:hidden
$
:lt(index)
.index( element )
.hover( fnIn(eventObj), fnOut(eventObj))
.next( [selector] )
$
$
jQuery.get( url [, data] [, fn( data, status, XHR )] [, type] )
:visible
XHR
:header
$
jQuery.pushStack( elements, [name, arguments] )
.nextAll( [selector] )
$
.toggle( fn(eventObj), fn2(eventObj) [, ...])
$
jQuery.getJSON( url [, data] [, fn( data, status )] )
XHR
:animated
.toArray( )
arr
1.4+
$
.nextUntil( [selector] )
1.4+
Event Helpers
XHR
jQuery.getScript( url [, fn( data, status )] )
Interoperability
.offsetParent( )
$
jQuery.post( url [, data] [, fn( data, status )] [, type] )
Child Filters
Attribute Filters
function ( [data,] [fn] )
XHR
jQuery.noConflict( [extreme] )
.parent( [selector] )
$
$
.blur,
.mousedown,
:nth-child(expr)
[attribute]
$
Global Ajax Event Handlers
$
.parents( [selector] )
.change,
.mouseenter,
:first-child
[attribute=value]
.ajaxComplete( fn( event, XHR, options ) )
$
Attributes
.parentsUntil( [selector] )
$
1.4+
.click,
.mouseleave,
:last-child
[attribute!=value]
$
.ajaxError( fn( event, XHR, options, thrownError ) )
.prev( [selector] )
$
.dblclick,
.mousemove,
:only-child
[attribute^=value]
Attributes
.ajaxSend( fn( event, XHR, options ) )
$
.prevAll( [selector] )
$
.error,
.mouseout,
[attribute$=value]
.attr( name )
str
.ajaxStart( fn( ) )
$
$
.prevUntil( [selector] )
1.4+
.focus,
.mouseover,
[attribute*=value]
.attr( name, val
.attr( map
$
),
),
.ajaxStop( fn( ) )
$
.siblings( [selector] )
$
.focusin,
.mouseup,
[attribute|=value]
.attr( name, fn(index, attr) )
1.4+
$
.ajaxSuccess( fn(event, XHR, options) )
.focusout,
.resize,
[attribute~=value]
.removeAttr( name )
1.4+
$
Miscellaneous
Miscellaneous
.keydown,
.scroll,
[attribute]
.add( selector [, context]
$
),
Class
.serialize( )
str
[attribute2]
.keypress,
.select,
.add( elements
),
.add( html )
1.4∗ ∗
.addClass( class
$
),
.serializeArray( )
[obj]
.keyup,
.submit,
.andSelf( )
$
.addClass( fn(index, class) )
1.4∗ ∗
Forms
Form Filters
str
jQuery.param( obj, [traditional] )
1.4∗ ∗
.load( [data,] fn
.unload( [data,] fn )
.contents( )
),
$
.hasClass( class )
bool
:input
:enabled
$
.end( )
.removeClass( [class]
$
),
Event object
Utilities
:text
:disabled
.removeClass( fn(index, class) )
1.4∗ ∗
event = {
:password
:checked
Manipulation
Browser and Feature Detection
.toggleClass( class [, switch]
$
),
currentTarget,
el
:radio
:selected
jQuery.support
.toggleClass( fn(index, class) [, switch] )
obj
1.4∗ ∗
data,
*
Inserting Inside
:checkbox
obj
jQuery.browser
deprecated
bool
isDefaultPrevented(),
HTML, text
.append( content
$
),
:submit
isImmediatePropagationStopped(),
jQuery.browser.version
bool
str
deprecated
.append( fn( index, html ) )
str
.html( )
1.4∗ ∗
:image
isPropagationStopped(),
bool
jQuery.boxModel
bool
deprecated
.appendTo( target )
.html( val
.html( fn(index, html) )
$
$
),
1.4∗ ∗
:reset
str
namespace,
1.4+
.prepend( content
Basic operations
.text( )
$
),
str
pageX,
:button
num
.prepend( fn( index, html ) )
1.4∗ ∗
obj
jQuery.each( obj, fn( index, valueOfElement ) )
$
.text( val
),
.text( fn(index, html) )
1.4∗ ∗
pageY,
num
:file
.prependTo( target )
$
jQuery.extend( [deep,] target, obj1 [, objN] )
preventDefault(),
obj
Value
relatedTarget,
jQuery.grep( array, fn( element, index ) [, invert] )
el
arr
Inserting Outside
str,arr.val( )
obj
result,
jQuery.makeArray( obj )
Legend
arr
.after( content
.after( fn() )
$
),
1.4∗ ∗
.val( val
.val( fn() )
$
),
1.4∗ ∗
stopImmediatePropagation(),
jQuery.map( array, fn( element, index ) )
arr
$
.before( content
),
stopPropagation(),
jQuery.inArray( val, array )
.before( fn() )
num
CSS
1.4∗ ∗
Conventional signs
el
target,
jQuery.merge( first, second )
.insertAfter( target )
arr
$
timeStamp,
[obj] — array of objects
num
CSS
fn
jQuery.noop
1.4+
$
.insertBefore( target )
type,
str
— new in 1.4
.css( name )
1.4+
str
jQuery.proxy( fn, scope
jQuery.proxy( scope, name )
fn
),
1.4+
str
which
Inserting Around
.css( name, val
.css( map
$
),
),
— changed in 1.4
jQuery.unique( array )
1.4∗ ∗
}
arr
.unwrap( )
$
1.4+
.css( name, fn(index, val) )
1.4∗ ∗
jQuery.trim( str )
str
.wrap( wrappingElement
$
),
Data types
Effects
Positioning
jQuery.parseJSON( str )
obj
1.4+
.wrap( fn )
1.4∗ ∗
* — anything
.offset( )
obj
.wrapAll(wrappingElement
Data functions
$
),
Basics
1.4∗ ∗
.offset( coord
.offset( fn( index, coord ) )
$
),
1.4+
$ — jQuery object
.wrapAll( fn )
1.4∗ ∗
.clearQueue( [name] )
.show( [ duration [, easing] [, fn] ] )
$
1.4+
$
$
.offsetParent( )
.wrapInner( wrappingElement
$
),
.dequeue( [name]
jQuery.dequeue( [name] )
arr — array
.hide( [ duration [, easing] [, fn] ] )
$
),
$
.position( )
obj
.wrapInner( fn )
1.4∗ ∗
obj
jQuery.data( element, key
),
jQuery.data( )
1.4+
$
.toggle( [showOrHide] )
bool — boolean
.scrollTop( )
int
.data(
.data( key )
Replacing
.toggle( duration [, easing] [, fn] )
obj
),
$
el — DOM element
.scrollTop( val )
$
.data( key, val
.data( obj )
.replaceWith( content
$
),
1.4∗ ∗
$
),
Sliding
1.4∗ ∗
int
.scrollLeft( )
fn — function
.replaceWith( fn )
1.4∗ ∗
$
.removeData( [name] )
.slideDown( duration [, easing] [, fn] )
$
.scrollLeft( val )
$
int — integer
.replaceAll( selector )
.queue( [name] ) jQuery.queue( [name] )
$
[fn]
.slideUp( duration [, easing] [, fn] )
$
Height and Width
.queue( [name,] fn( next )
jQuery.queue( [name,] fn( ) )
$
),
obj — object
Removing
.slideToggle( [duration] [, easing] [, fn] )
$
.height( )
.queue( [name,] queue
jQuery.queue( [name,] queue )
int
$
),
.detach( [selector] )
str — string
$
1.4+
Fading
1.4∗ ∗
$
.height( val
),
.height( fn(index, height ) )
1.4∗ ∗
.empty( )
Test operations
$
XHR — XMLHttpRequest
.fadeIn( duration [, easing] [, fn] )
$
.width( )
int
$
.remove( [selector] )
str
jQuery.type( obj )
1.4+
.fadeOut( duration [, easing] [, fn] )
$
.width( val ), .width(( fn(index, height ) )
$
1.4∗ ∗
jQuery.isArray( obj )
bool
Copying
$
.fadeTo( [duration,] opacity [, easing] [, fn] )
int
.innerHeight( )
jQuery.isEmptyObject( obj )
bool
1.4+
.clone( [withDataAndEvents] )
$
.fadeToggle( [duration,] [, easing] [, fn] )
$
.innerWidth( )
int
bool
jQuery.isFunction( obj )
ver. 13-11-2010
.outerHeight( [margin] )
int
Custom
jQuery.isPlainObject( obj )
bool
1.4+
.outerWidth( [margin] )
int
.animate( params [, duration] [, easing] [, fn] )
$
jQuery.isWindow( obj )
bool
1.4+
$
.animate( params, options )
.stop( [clearQueue] [, jumpToEnd] )
$
.
$
.delay( duration [, queueName] )
jQuery 1.4.4 API Cheat Sheet
$
1.4+
Settings
jQuery.fx.off
bool
num
jQuery.fx.interval
1.4+

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education
Go