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

More Related Content

PDF
citigroup January 13, 2006 - Reformatted Quarterly Financial Data Supplement...
PDF
Fabric.js @ Falsy Values
PPTX
jQuery
PDF
Prototype UI Intro
PDF
Jquery.cheatsheet.1.4
PDF
Scala in practice
KEY
Sexy.js: A Sequential Ajax (Sajax) library for jQuery
PPTX
Prototype Framework
citigroup January 13, 2006 - Reformatted Quarterly Financial Data Supplement...
Fabric.js @ Falsy Values
jQuery
Prototype UI Intro
Jquery.cheatsheet.1.4
Scala in practice
Sexy.js: A Sequential Ajax (Sajax) library for jQuery
Prototype Framework

What's hot (13)

PDF
this is ruby test
PPTX
PDF
Doc Parsers Api Cheatsheet 1 0
PPT
Jquery presentation
PPTX
JQuery
PDF
Functionality Focused Code Organization
PDF
Using Templates to Achieve Awesomer Architecture
PDF
Spine JS
PDF
YUI3 Modules
PDF
Beyond the DOM: Sane Structure for JS Apps
PDF
Delivering a Responsive UI
PDF
DeprecatedAPI로 알아보는 SwiftUI
this is ruby test
Doc Parsers Api Cheatsheet 1 0
Jquery presentation
JQuery
Functionality Focused Code Organization
Using Templates to Achieve Awesomer Architecture
Spine JS
YUI3 Modules
Beyond the DOM: Sane Structure for JS Apps
Delivering a Responsive UI
DeprecatedAPI로 알아보는 SwiftUI
Ad

Similar to JQUERY TUTORIAL (20)

PDF
jQuery%20on%20Rails%20Presentation
PDF
jQuery%20on%20Rails%20Presentation
PDF
Rails Presentation - Technology Books, Tech Conferences
PDF
JQuery-Tutorial" />
KEY
Learning How To Use Jquery #5
PPTX
Introduction to Jquery
KEY
An in-depth look at jQuery
PDF
DOM Scripting Toolkit - jQuery
PDF
Remy Sharp The DOM scripting toolkit jQuery
PDF
PPTX
Web technologies-course 11.pptx
PDF
The Dom Scripting Toolkit J Query
PDF
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
PDF
jQuery Internals + Cool Stuff
PPTX
jQuery
PDF
jQuery (DrupalCamp Toronto)
KEY
Learning How To Use Jquery #3
PDF
jQuery Training
PDF
An Introduction to Jquery
PPTX
jQuery basics for Beginners
jQuery%20on%20Rails%20Presentation
jQuery%20on%20Rails%20Presentation
Rails Presentation - Technology Books, Tech Conferences
JQuery-Tutorial" />
Learning How To Use Jquery #5
Introduction to Jquery
An in-depth look at jQuery
DOM Scripting Toolkit - jQuery
Remy Sharp The DOM scripting toolkit jQuery
Web technologies-course 11.pptx
The Dom Scripting Toolkit J Query
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Internals + Cool Stuff
jQuery
jQuery (DrupalCamp Toronto)
Learning How To Use Jquery #3
jQuery Training
An Introduction to Jquery
jQuery basics for Beginners
Ad

Recently uploaded (20)

DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Big Data Technologies - Introduction.pptx
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
Advanced IT Governance
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Electronic commerce courselecture one. Pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
Spectroscopy.pptx food analysis technology
PDF
Empathic Computing: Creating Shared Understanding
The AUB Centre for AI in Media Proposal.docx
Advanced methodologies resolving dimensionality complications for autism neur...
Spectral efficient network and resource selection model in 5G networks
Big Data Technologies - Introduction.pptx
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
Chapter 3 Spatial Domain Image Processing.pdf
GamePlan Trading System Review: Professional Trader's Honest Take
Advanced IT Governance
Per capita expenditure prediction using model stacking based on satellite ima...
Electronic commerce courselecture one. Pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Diabetes mellitus diagnosis method based random forest with bat algorithm
“AI and Expert System Decision Support & Business Intelligence Systems”
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Spectroscopy.pptx food analysis technology
Empathic Computing: Creating Shared Understanding

JQUERY TUTORIAL

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