• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
jQuery1.2.cheatsheet.v1.0_1
 

jQuery1.2.cheatsheet.v1.0_1

on

  • 179 views

 

Statistics

Views

Total Views
179
Views on SlideShare
179
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    jQuery1.2.cheatsheet.v1.0_1 jQuery1.2.cheatsheet.v1.0_1 Presentation Transcript

    • 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 ) XHRjQuery 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 ) jQueryPlugins: :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( ) jQueryInteroperability: :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 MapATTRIBUTES :animated Array<Element> wrapInner( elem ) jQuery load( fn ) jQuery jQuery.browser.version StringAttr: 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 ) ArrayClass: :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 ) StringText: [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( ) jQueryValue: 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 = equationCSS :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 ) jQueryPositioning: :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>