jQuery CheatSheet

Description

jQuery CheatSheet

Reviews
Shared by: Shailesh Patel
Stats
views:
108
rating:
not rated
reviews:
0
posted:
5/21/2009
language:
English
pages:
0
jQuery 1.2 Cheat Sheet v1.0 CORE $(...) The jQuery Function: jQuery( expr, context ) jQuery jQuery( html ) jQuery jQuery( elements ) jQuery jQuery( cb ) jQuery jQuery Object Accessors: each( cb ) jQuery size( ) Number length Number eq( position ) jQuery get( ) Array get( index ) Element index( subject ) Number Plugins: jQuery.fn.extend( object ) jQuery jQuery.extend( object ) jQuery Interoperability: jQuery.noConflict( ) jQuery jQuery.noConflict( extreme ) jQuery gscottolson.com/weblog/ MANIPULATION Changing Contents: html( ) html( val ) text( ) text( val ) Inserting Inside: append( content ) appendTo( content ) prepend( content ) prependTo( content ) Inserting Outside: after( content ) before( content ) insertAfter( content ) insertBefore( content ) Inserting Around: wrap( html ) wrap( elem ) wrapAll( html ) wrapAll( elem ) wrapInner( html ) wrapInner( elem ) Replacing: replaceWith( content ) replaceAll( selector ) Removing: empty( ) remove( expr ) Copying: clone( ) clone( true ) String jQuery String jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery SELECTORS ATTRIBUTES Attr: attr( name ) attr( properties ) attr( key, value ) attr( key, fn ) removeAttr( name ) Class: addClass( class ) removeClass( class ) toggleClass( class ) HTML: html( ) html( val ) Text: text( ) text( val ) Value: val( ) val( val ) val( val ) Object jQuery jQuery jQuery jQuery jQuery jQuery jQuery String jQuery String jQuery String, Array jQuery jQuery CSS CSS: css( name ) css( properties ) css( name, value ) Positioning: offset( ) Height and Width: height( ) height( val ) width( ) width( val ) String jQuery jQuery Object{top,left} Integer jQuery Integer jQuery Basics: #id Element element Array .class Array * Array selector1, selectorN Array Hierarchy: ancestor descendant Array parent > child Array prev + next Array prev ~ siblings Array Basic Filters: :first Element :last Element :not(selector) Array :even Array :odd Array :eq(index) Element :gt(index) Array :lt(index) Array :header Array :animated Array Content Filters: :contains(text) Array :empty Array :has(selector) Array :parent Array Visibility Filters: :hidden Array :visible Array Attribute Filters: [attribute] Array [attribute=value] Array [attribute!=value] Array [attribute^=value] Array [attribute$=value] Array [attribute*=value] Array [selector1][selectorN] Array Child Filters: :nth-child(idx/even/odd/eq) Array :first-child Array :last-child Array :only-child Array Forms: :input Array :text Array :password Array :radio Array :checkbox Array :submit Array :image Array :reset Array :button Array :file Array :hidden Array Form Filters: :enabled Array :disabled Array :checked Array :selected Array EVENTS Page Load: ready( fn ) Event Handling: bind( type, data, fn ) one( type, data, fn ) trigger( type, data ) triggerHandler( type, data ) unbind( type, data ) Interaction Helpers: hover( over, out ) toggle( fn, fn ) Event Helpers: blur( [fn] ) change( [fn] ) click( [fn] ) dblclick( [fn] ) error( [fn] ) focus( [fn] ) keydown( [fn] ) keypress( [fn] ) keyup( [fn] ) load( fn ) mousedown( fn ) mousemove( fn ) mouseout( fn ) mouseover( fn ) mouseup( fn ) resize( fn ) scroll( fn ) select( [fn] ) submit( [fn] ) unload( fn ) AJAX jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery Ajax Requests: jQuery.ajax( options ) load( url, data, cb ) jQuery.get( url, data, cb ) jQuery.getJSON( url, data, cb ) jQuery.getScript( url, cb ) jQuery.post( url, data, cb, type ) Ajax Events: ajaxComplete( cb ) ajaxError( cb ) ajaxSend( cb ) ajaxStart( cb ) ajaxStop( cb ) ajaxSuccess( cb ) Misc: jQuery.ajaxSetup( options ) serialize( ) serializeArray( ) XHR jQuery XHR XHR XHR XHR jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery UTILITIES TRAVERSING Filtering: eq( index ) hasClass( class ) filter( expr ) filter( fn ) is( expr ) map( cb ) not( expr ) slice( start, end ) Finding: add( expr ) children( expr ) contents( ) find( expr ) next( expr ) nextAll( expr ) parent( expr ) parents( expr ) prev( expr ) prevAll( expr ) siblings( expr ) Chaining: andSelf( ) end( ) jQuery Boolean jQuery jQuery Boolean jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery jQuery EFFECTS Basics: show( [speed, cb] ) jQuery hide( [speed, cb] ) jQuery toggle( ) jQuery Sliding: slideDown( speed, cb ) jQuery slideUp( speed, cb ) jQuery slideToggle( speed, cb ) jQuery Fading: fadeIn( speed, cb ) jQuery fadeOut( speed, cb ) jQuery fadeTo( speed, opacity, cb ) jQuery Custom: animate( params, dur, easing, cb ) jQuery animate( params, options ) jQuery stop( ) jQuery queue( ) Array queue( cb ) jQuery queue( queue ) jQuery dequeue( ) jQuery jQuery.browser Map jQuery.browser.version String jQuery.boxModel Boolean Array and Object operations: jQuery.each( object, cb ) Object jQuery.extend( target, obj1, objN ) Object jQuery.grep( arr, cb, invert ) Array jQuery.makeArray( obj ) Array jQuery.map( arr, cb ) Array jQuery.inArray( value, arr ) Number jQuery.unique( arr ) Array Test operations: jQuery.isFunction( obj ) Boolean String operations: jQuery.trim( str ) String Key: cb = callback dur = duration idx = index eq = equation XHR = XmlHTTPRequest arr = array [fn] = optional function

Shared by: Shailesh Patel
About
I am a 25 yr guy from ahmedabad(INDIA). Working as a WAMP/ LAMP developer since last 3+year. Write now I am working as a Team leader cum technical support executive in Magic Technosys, Ahmedabad. I am also writing article on my (More...)
Related docs
jQuery 1.3 Cheat Sheet
Views: 218  |  Downloads: 21
jquery doc
Views: 333  |  Downloads: 70
jQuery Introduction
Views: 682  |  Downloads: 47
An Introduction to jQuery
Views: 193  |  Downloads: 33
Datetime dengan JQuery
Views: 11  |  Downloads: 0
jQuery Selectors
Views: 1590  |  Downloads: 80
jquery
Views: 135  |  Downloads: 15
jQuery and Drupal
Views: 9  |  Downloads: 6
JavaScript _ jQuery
Views: 10  |  Downloads: 3
jQuery Workshop
Views: 106  |  Downloads: 12
jQuery Slides
Views: 139  |  Downloads: 19