SlideShare ist ein Scribd-Unternehmen logo
1 von 4
Downloaden Sie, um offline zu lesen
jQUERY 1.5                                                       SELECTORS ✼ CORE ✼ ATTRIBUTES ✼ CSS ✼ TRAVERSING ✼ MANIPULATION ✼ EVENTS ✼ EFFECTS ✼ AJAX ✼ UTILITIES ✼ DEFERRED OBJECT
                                                                                                                                                             Designed by Antonio Lupetti © 2011 • http://woorkup.com • http://twitter.com/woork | jQuery is © of John Resig and the jQuery Team.
VISUAL CHEAT SHEET
                                                              = NEW IN jQUERY 1.5 /        f(x) = FUNCTION    /   a = ARRAY   / jQ = jQUERY     /   El = ELEMENT         /   0-1 = BOOLEAN   /   Obj = OBJECT       /   NUM = NUMBER        /   Str = STRING




❉ SELECTORS / 1. BASIC                                      :header Selector                                             [name!=value]                                                   :file Selector                                                   .get( [ index ] )
                                                                                                                                                                                                                                          a<El(s)>
                                                            Selects all elements that are headers, like    a<El(s)>      Select elements that either don't have the                      Selects all elements of type file.                              Retrieve the DOM elements matched by the         El | a
                                                                                                                                                                             a<El(s)>
All Selector (“*”)                                          h1, h2, h3 and so on.                                        specified attribute, or do have the specified                                                                                   jQuery object.
                                                  <El(s)>                                                                                                                                :image Selector
Selects all elements.                                                                                                    attribute but not with a certain value.                                                                          a<El(s)>
                                                            :last Selector                                                                                                               Selects all elements of type image.                             .index()
                                                                                                             a<El>       [name^=value]
Class Selector (“.class”)                                   Selects the last matched element.                                                                                                                                                            Search for a given element from among the         Num
                                                 a<El(s)>                                                                                                                                :input Selector
Matches all elements with the given name.                                                                                Selects elements that have the specified            a<El(s)>                                                                    matched elements.
                                                            :lt() Selector                                               attribute with a value beginning exactly                        Selects all input, textarea, select and button   a<El(s)>
Element Selector (“element”)                                                                               a<El(s)>      with a given string.                                            elements.                                                       .length
                                                            Select all elements at an index less than                                                                                                                                                                                                      Num
Selects all elements with the given tag          a<El(s)>   index within the matched set.                                                                                                                                                                The number of elements in the jQuery object.
                                                                                                                         [name]                                                          :password Selector
name.                                                                                                                                                                                                                                     a<El(s)>
                                                            :not() Selector                                              Selects elements that have the specified            a<El(s)>
                                                                                                                                                                                         Selects all elements of type password.                          .selector
ID Selector (“#id”)                                         Selects all elements that do not match the     a<El(s)>      attribute, with any value.                                                                                                      A selector representing selector originally         Str
Selects a single element with the given id         a<El>    given selector.                                                                                                              :radio Selector                                                 passed to jQuery().
                                                                                                                         [name=value][name2=value2]                                                                                       a<El(s)>
attribute.                                                                                                                                                                               Selects all elements of type radio.
                                                            :odd Selector                                                Matches elements that match all of the              a<El(s)>                                                                    .size()
Multiple Selector (“selector1,                              Selects odd elements, zero-indexed. See        a<El(s)>      specified attribute filters.                                    :reset Selector                                                 Return the number of DOM elements matched         Num
                                                                                                                                                                                                                                          a<El(s)>
selector2, selectorN”)                           a<El(s)>   also even.                                                                                                                   Selects all elements of type reset.                             by the jQuery object.
Selects the combined results of all the                                                                                  ❉ SELECTORS / 6. CHILD FILTER                                   :selected Selector                                              .toArray()
specified selectors.                                                                                                                                                                                                                      a<El(s)>
                                                            ❉ SELECTORS / 4. CONTENT FILTER                                                                                              Selects all elements that are selected.                         Retrieve all the DOM elements contained in the        a
                                                                                                                         :first-child Selector                                                                                                            jQuery set, as an array.
                                                            :contains() Selector                                         Selects all elements that are the first child       a<El(s)>    :submit Selector
❉ SELECTORS / 2. HIERARCHY                                                                                                                                                                                                                a<El(s)>
                                                            Select all elements that contain the           a<El(s)>      of their parent.
                                                                                                                                                                                         Selects all elements of type submit.
Child Selector (“parent > child”)                           specified text.                                                                                                                                                                              ❉ CORE / 3. DATA
                                                                                                                         :last-child Selector
Selects all direct child elements specified by   a<El(s)>                                                                                                                                :text Selector
                                                            :empty Selector                                              Selects all elements that are the last child of     a<El(s)>                                                     a<El(s)>       .queue( [ queueName ], newQueue)
"child" of elements specified by "parent".                                                                                                                                               Selects all elements of type text.
                                                                                                           a<El(s)>      their parent.                                                                                                                   Show the queue of functions to be executed on        jQ
                                                            Select all elements that have no children
Descendant Selector (“ancestor                              (including text nodes).                                      :nth-child Selector
                                                                                                                                                                                                                                                         the matched elements.
descendant”)                                                                                                                                                                             ❉ CORE / 1. THE jQUERY FUNCTION
                                                 a<El(s)>   :has() Selector                                              Selects all elements that are the nth-child of      a<El(s)>                                                                    .data( obj )
Selects all elements that are descendants of                                                               a<El(s)>      their parent.                                                                                                                                                                        jQ
                                                            Selects elements which contain at least one                                                                                  jQuery()                                                        Store arbitrary data associated with the
a given ancestor.                                                                                                                                                                                                                                        matched elements.
                                                            element that matches the specified selector.                 :only-child Selector                                            Accepts a string containing a CSS selector              jQ
Next Adjacent Selector (“prev +                                                                                                                                              a<El(s)>    which is then used to match a set of                            .removeData( [ name ] )
                                                            :parent Selector                                             Selects all elements that are the only child                                                                                                                                         jQ
next”)                                                                                                                                                                                   elements.
                                                            Select all elements that are the parent of     a<El(s)>      of their parent.                                                                                                                Remove a previously-stored piece of data.
                                                 a<El(s)>
Selects all next elements matching "next"                   another element, including text nodes.                                                                                       jQuery.sub()
that are immediately preceded by a sibling                                                                                                                                                                                                               .dequeue( [ queueName ] )
"prev".                                                                                                                  ❉ SELECTORS / 7. VISIBILITY FILTER                              Creates a new copy of jQ whose properties               jQ                                                           jQ
                                                                                                                                                                                                                                                         Execute the next function on the queue for the
                                                            ❉ SELECTORS / 5. ATTRIBUTE                                                                                                   and methods can be modified without                             matched elements.
Next Siblings Selector (“prev ~                                                                                          :hidden Selector                                                affecting the original jQuery object.
                                                                                                                                                                             a<El(s)>
siblings”)                                                  [name|=value]                                                Selects all elements that are hidden.
                                                 a<El(s)>                                                                                                                                jQuery.when()                                                   ❉ CORE / 4. INTEROPERABILITY
Selects all sibling elements that follow after              Selects elements that have the specified
the "prev" element, have the same parent,                                                                  a<El(s)>      :visible Selector                                               Provides a way to execute callback functions
                                                            attribute with a value either equal to a                                                                         a<El(s)>                                                 Deferred
and match the filtering "siblings" selector.                given string or starting with that string                    Selects all elements that are visible.                          based on one or more objects, usually                           jQuery.fn.extend( object )
                                                            followed by a hyphen (-).                                                                                                    Deferred objects that represent                                 Extends the jQuery element set to provide new        jQ
                                                                                                                                                                                         asynchronous events.                                            methods (used to make a typical jQuery
❉ SELECTORS / 3. BASIC FILTER                               [name*=value]                                                ❉ SELECTORS / 8. FORM                                                                                                           plugin).
                                                            Selects elements that have the specified
                                                                                                                                                                                         jQuery.noConflict( )
                                                                                                           a<El(s)>
:animated Selector                                          attribute with a value containing the a                      :button Selector                                                Relinquish jQuery's control of the $                   Obj      jQuery.extend( object )
                                                                                                                                                                                                                                                                                                              jQ
Select all elements that are in the progress     a<El(s)>   given substring.                                             Selects all button elements and elements of         a<El(s)>    variable.                                                       Extends the jQuery object itself.
of an animation at the time the selector is                                                                              type button.
run.                                                        [name~=value]                                                                                                                jQuery.extend( object )
                                                                                                                                                                                                                                                 jQ
                                                            Selects elements that have the specified       a<El(s)>
                                                                                                                         :checkbox Selector                                              Extends the jQuery object itself.                               ❉ ATTRIBUTES / 1. ATTR
:eq() Selector                                                                                                                                                               a<El(s)>
                                                            attribute with a value containing a given                    Selects all elements of type checkbox.
Select the element at index n within the           a<El>    word, delimited by spaces.                                                                                                                                                                   .attr( attributeName )
matched set.                                                                                                             :checked Selector                                               ❉ CORE / 2. OBJECT ACCESSORS                                    Get the value of an attribute for the first        Obj
                                                            [name$=value]                                                                                                    a<El(s)>
                                                                                                                         Matches all elements that are checked.                                                                                          element in the set of matched elements.
:even Selector                                              Selects elements that have the specified                                                                                     .context
                                                 a<El(s)>                                                  a<El(s)>
Selects even elements, zero-indexed                         attribute with a value ending exactly with                   :disabled Selector                                              The DOM node context originally passed to               El      .attr( attributeName, value )
                                                                                                                                                                             a<El(s)>
                                                            a given string.                                              Selects all elements that are disabled.                         jQuery().                                                       Set one or more attributes for the set of          Obj
:first Selector                                                                                                                                                                                                                                           matched elements.
                                                   a<El>    [name=value]
Selects the first matched element.                                                                                       :enabled Selector                                               .each( function(index, Element) )
                                                                                                           a<El(s)>                                                          a<El(s)>                                                                    .removeAttr()
                                                            Selects all elements that are headers, like                                                                                  Iterate over a jQ object, executing a function          jQ
                                                                                                                         Selects all elements that are enabled.
:gt() Selector                                              h1, h2, h3 and so on.                                                                                                        for each matched element.                                       Remove an attribute from each element in the         jQ
Select all elements at an index greater than     a<El(s)>                                                                                                                                                                                                set of matched elements.
index within the matched set.
jQUERY 1.5                                                         SELECTORS ✼ CORE ✼ ATTRIBUTES ✼ CSS ✼ TRAVERSING ✼ MANIPULATION ✼ EVENTS ✼ EFFECTS ✼ AJAX ✼ UTILITIES ✼ DEFERRED OBJECT
                                                                                                                                                                   Designed by Antonio Lupetti © 2011 • http://woorkup.com • http://twitter.com/woork | jQuery is © of John Resig and the jQuery Team.
VISUAL CHEAT SHEET
                                                               = NEW IN jQUERY 1.5 /          f(x) = FUNCTION       /    a = ARRAY   / jQ = jQUERY     /   El = ELEMENT     /     0-1 = BOOLEAN   /   Obj = OBJECT       /   NUM = NUMBER         /   Str = STRING




❉ ATTRIBUTES / 2. CLASS                                      ❉ CSS / 2. POSITIONING                                             .width( value )                                               .next( [ selector ] )                                            .andSelf()
                                                                                                                                                                                       jQ                                                                      Add the previous set of elements on the stack to     jQ
                                                                                                                                Set the CSS width of each element in the set of               Get the immediately following sibling of each            jQ
.addClass( class )                                           .scrollLeft()                                                      matched elements.                                             element in the set of matched elements, optionally               the current set.
Adds the specified class(es) to each of the set of     jQ    Get the current horizontal position of the                                                                                       filtered by a selector.
                                                                                                                        Int
matched elements.                                            scroll bar for the first element in the set of                     .width()                                                                                                                       .contents()
                                                             matched elements.                                                                                                        Int     .nextAll( [ selector ] )                                         Get the children of each element in the set of       jQ
.hasClass( class )                                                                                                              Get the current computed width for the first
                                                                                                                                element in the set of matched elements.                                                                                        matched elements, including text nodes.
                                                     0-1     .scrollLeft( value )                                                                                                             Get all following siblings of each element in the        jQ
Determine whether any of the matched                                                                                                                                                          set of matched elements, optionally filtered by a
elements are assigned the given class.                       Set the current horizontal position of the                                                                                                                                                        .end()
                                                                                                                         jQ                                                                   selector.
                                                             scroll bar for each of the set of matched                          ❉ TRAVERSING / 1. FILTERING                                                                                                    End the most recent filtering operation in the       jQ
.removeClass( class )                                        elements.                                                                                                                                                                                         current chain and return the set of matched
                                                                                                                                                                                              .nextUntil( [ selector ] )
Remove a single class, multiple classes, or all        jQ                                                                                                                                                                                                      elements to its previous state.
                                                             .offset()                                                           .eq( - index )                                                Get all following siblings of each element up to         jQ
classes from each element in the set of matched
                                                                                                                     Obj        Reduce the set of matched elements to the one at       jQ     but not including the element matched by the
elements.                                                    Get the current coordinates of the first
                                                             element in the set of matched elements,           {top, left}      the specified index.                                          selector.                                                        ❉ MANIPULATION / 1. INSIDE
.toggleClass( class, switch )                                relative to the document.
Add or remove one or more classes from each                                                                                     .eq( index )                                                  .offsetParent()                                                   .append( content )
element in the set of matched elements,                jQ    .offset( coordinates )                                              Reduce the set of matched elements to the one at       jQ                                                              jQ      Insert content, specified by the parameter, to the
                                                                                                                                                                                              Get the closest ancestor element that is                                                                              jQ
depending on either the class's presence or the              Set the current coordinates of every element                jQ     the specified index.                                          positioned.                                                      end of each element in the set of matched
value of the switch argument.                                in the set of matched elements, relative to                                                                                                                                                       elements.
                                                             the document.                                                      .filter( selector )
                                                                                                                                                                                       jQ     .parent( [ selector ] )                                          .append( function(index, html) )
                                                             .position()                                                        Reduce the set of matched elements to those that
❉ ATTRIBUTES / 3. HTML                                                                                                          match the selector or pass the function's test.               Get the parent of each element in the current set        jQ      Insert content, specified by the parameter, to the   jQ
                                                                                                                     Obj
                                                             Get the current coordinates of the first                                                                                         of matched elements, optionally filtered by a                    end of each element in the set of matched
.html()                                                      element in the set of matched elements,           {top, left}                                                                    selector.                                                        elements.
                                                                                                                                .is( selector )
                                                      Str    relative to the offset parent.
Get the HTML contents of the first element in                                                                                   Check the current matched set of elements             0-1                                                                      .appendTo( target )
the set of matched elements.                                                                                                                                                                  .parents( [ selector ] )
                                                             .scrollTop()                                                       against a selector and return true if at least one
                                                                                                                                                                                                                                                               Insert every element in the set of matched           jQ
                                                                                                                                of these elements matches the selector.                       Get the ancestors of each element in the current         jQ
.html( htmlString )                                          Get the current vertical position of the scroll            Int                                                                   set of matched elements, optionally filtered by a                elements to the end of the target.
                                                       jQ    bar for the first element in the set of                                                                                          selector.
Set the HTML contents of each element in the
                                                             matched elements.                                                  .map( callback(index, domEl) )                                                                                                 .prepend( content )
set of matched elements.
                                                                                                                                Pass each element in the current matched set           jQ     .parentsUntil( [ selector ] )                                    Insert content, specified by the parameter, to the   jQ
                                                             .scrollTop( value )                                                through a function, producing a new jQuery                                                                                     beginning of each element in the set of matched
                                                             Set the current vertical position of the scroll                    object containing the return values.                          Get the ancestors of each element in the current         jQ      elements.
❉ ATTRIBUTES / 4. TEXT                                       bar for each of the set of matched elements.                                                                                     set of matched elements, up to but not including
                                                                                                                                .not()                                                        the element matched by the selector.                             .prependTo( target )
.text()                                                                                                                                                                                jQ
                                                                                                                                Remove elements from the set of matched                       .prev( [ selector ] )                                            Insert content, specified by the parameter, to the   jQ
Get the combined text contents of each element        Str    ❉ CSS / 3. HEIGHT & WIDTH                                          elements.                                                                                                                      end of each element in the set of matched
in the set of matched elements, including their                                                                                                                                               Get the immediately preceding sibling of each            jQ      elements.
descendants.                                                 .height( value )                                                   .slice( start, [ end ] )                                      element in the set of matched elements, optionally
                                                             Set the CSS height of every matched                         jQ                                                                   filtered by a selector.
.text( textString )                                                                                                             Reduce the set of matched elements to a subset         jQ
                                                             element.                                                                                                                                                                                          ❉ MANIPULATION / 2. OUTSIDE
                                                       jQ                                                                       specified by a range of indices.                              .prevAll( [ selector ] )
Set the content of each element in the set of
matched elements to the specified text.                      .height()                                                                                                                        Get all preceding siblings of each element in the        jQ      .after( content )
                                                                                                                        Int                                                                   set of matched elements, optionally filtered by a                                                                     jQ
                                                             Get the current computed height for the first                      ❉ TRAVERSING / 2. TREE TRAVERSAL                                                                                               Insert content, specified by the parameter, after
                                                             element in the set of matched elements.                                                                                          selector.                                                        each element in the set of matched elements.
❉ ATTRIBUTES / 5. VALUE
                                                             .innerHeight()                                                     .children( [ selector ] )                                     .prevUntil( [ selector ] )                                       .after( function(index) )
.val()                                                       Get the current computed height for the first              Int     Get the children of each element in the set of         jQ     Get the ancestors of each element in the current                 Insert content, specified by the parameter, to the
                                                     Str |                                                                                                                                                                                             jQ                                                           jQ
Get the current value of the first element in the            element in the set of matched elements,                            matched elements, optionally filtered by a                    set of matched elements, optionally filtered by a                end of each element in the set of matched
                                                        a
set of matched elements.                                     including padding but not border.                                  selector.                                                     selector.                                                        elements.

.val( value )                                                .innerWidth()                                                      .closest( selector )                                          .siblings( [ selector ] )                                        .before( content )
Set the value of each element in the set of            jQ    Get the current computed width for the first               Int     Get the first ancestor element that matches the                                                                                Insert content, specified by the parameter, before   jQ
                                                                                                                                                                                       jQ     Get the siblings of each element in the set of           jQ
matched elements.                                            element in the set of matched elements,                            selector, beginning at the current element and                matched elements, optionally filtered by a                       each element in the set of matched elements.
                                                             including padding but not border.                                  progressing up through the DOM tree.                          selector.
                                                                                                                                                                                                                                                               .before( function )
                                                             .outerHeight()                                                     .closest( selectors, [ context ] )                                                                                             Insert content, specified by the parameter, before   jQ
❉ CSS / 1. CSS                                               Get the current computed height for the first                                                                                    ❉ TRAVERSING / 3. MISCELLANEOUS                                  each element in the set of matched elements.
                                                                                                                        Int     Get the first ancestor element that matches the        jQ
                                                             element in the set of matched elements,                            selector, beginning at the current element and
.css( propertyName )                                         including padding, border, and optionally                                                                                        .add()                                                           .insertAfter( target )
                                                                                                                                progressing up through the DOM tree.                                                                                   jQ
Get the value of a style property for the first       Str    margin.                                                                                                                                                                                                                                                jQ
                                                                                                                                                                                              Add elements to the set of matched elements.                     Insert every element in the set of matched
element in the set of matched elements.                                                                                         .find( selector )                                                                                                               elements after the target.
                                                             .outerWidth()                                                                                                                    .add( selectors, [ context ] )
.css( propertyName, value )                                  Get the current computed width for the first                       Get the descendants of each element in the             jQ                                                              jQ      .insertBefore( target )
                                                                                                                        Int                                                                   Add elements to the set of matched elements.
Set one or more CSS properties for the set of          jQ    element in the set of matched elements,                            current set of matched elements, filtered by a                                                                                                                                      jQ
                                                                                                                                selector.                                                                                                                      Insert every element in the set of matched
matched elements.                                            including padding and border.                                                                                                                                                                     elements before the target.
jQUERY 1.5                                                      SELECTORS ✼ CORE ✼ ATTRIBUTES ✼ CSS ✼ TRAVERSING ✼ MANIPULATION ✼ EVENTS ✼ EFFECTS ✼ AJAX ✼ UTILITIES ✼ DEFERRED OBJECT
                                                                                                                                                             Designed by Antonio Lupetti © 2011 • http://woorkup.com • http://twitter.com/woork | jQuery is © of John Resig and the jQuery Team.
VISUAL CHEAT SHEET
                                                            = NEW IN jQUERY 1.5 /        f(x) = FUNCTION        /   a = ARRAY   / jQ = jQUERY    /   El = ELEMENT    /     0-1 = BOOLEAN   /   Obj = OBJECT     /   NUM = NUMBER          /   Str = STRING



❉ MANIPULATION / 3. AROUND                                ❉ EVENTS / 1. DOCUMENT LOADING                                   ❉ EVENTS / 3. MOUSE EVENTS                                  ❉ EVENTS / 4. FORM EVENTS                                       event.pageX
                                                                                                                                                                                                                                                       The mouse position relative to the left edge of   Num
.unwrap()                                                                                                                  .click( handler(eventObject) )                              .blur( handler(eventObject) )                                   the document.
                                                          .load( handler(eventObject) )
                                                                                                                           Bind an event handler to the "click" JavaScript      jQ     Bind an event handler to the "blur" JavaScript          jQ
Remove the parents of the set of matched                  Bind an event handler to the "load" JavaScript            jQ
                                                     jQ                                                                                                                                event, or trigger that event on an element.                     event.pageY
elements from the DOM, leaving the matched                event.                                                           event, or trigger that event on an element.
                                                                                                                                                                                                                                                       The mouse position relative to the top edge of    Num
elements in their place.                                                                                                                                                               .change( handler(eventObject) )
                                                                                                                           .dblclick( handler(eventObject) )                                                                                           the document.
                                                          .ready( handler )                                                                                                            Bind an event handler to the "change"
.wrap( wrappingElement )                                                                                                   Bind an event handler to the "dblclick"              jQ                                                             jQ
                                                          Specify a function to execute when the DOM is             jQ                                                                 JavaScript event, or trigger that event on an
                                                     jQ
                                                                                                                           JavaScript event, or trigger that event on an                                                                               event.preventDefault()
Wrap an HTML structure around each element in             fully loaded.                                                    element.                                                    element.                                                        If this method is called, the default action
the set of matched elements.                                                                                                                                                                                                                           of the event will not be triggered.
                                                          .unload( handler(eventObject) )                                  .focusin( handler(eventObject) )                            .focus( handler(eventObject) )
.wrap( wrappingFunction )                                                                                           jQ                                                          jQ     Bind an event handler to the "focus" JavaScript         jQ      event.relatedTarget
                                                          Bind an event handler to the "unload" JavaScript                 Bind an event handler to the "focusin" JavaScript
Wrap an HTML structure around each element in        jQ   event.                                                           event.                                                      event, or trigger that event on an element.                     The other DOM element involved in the event,       El
the set of matched elements.                                                                                                                                                                                                                           if any.
                                                                                                                                                                                       .select( handler(eventObject) )
                                                                                                                           .focusout( handler(eventObject) )
                                                                                                                                                                                       Bind an event handler to the "select" JavaScript        jQ
.wrapAll( wrappingElement )                                                                                                                                                     jQ                                                                     event.result
                                                          ❉ EVENTS / 2. HANDLER ATTACHMENT                                 Bind an event handler to the "focusout"
                                                                                                                                                                                       event, or trigger that event on an element.
Wrap an HTML structure around all elements in        jQ                                                                    JavaScript event.                                                                                                           This attribute contains the last value returned   Obj
the set of matched elements.                              .bind( eventType, [ eventData ], handler                                                                                     .submit( handler(eventObject) )                                 by an event handler that was triggered by thisAnything
                                                                                                                           .hover( handlerIn(eventObject),                                                                                     jQ      event, unless the value was undefined.
.wrapInner( wrappingElement )                             (eventObject) )                                           jQ
                                                                                                                           handlerOut(eventObject) )
                                                                                                                                                                                       Bind an event handler to the "submit" JavaScript
                                                          Attach a handler to an event for the elements.                                                                        jQ     event, or trigger that event on an element.
Wrap an HTML structure around the content of         jQ                                                                    Bind two handlers to the matched elements, to be                                                                            event.stopImmediatePropagation()
each element in the set of matched elements.                                                                               executed when the mouse pointer enters and                                                                                  Prevents other event handlers from being
                                                          .delegate( selector, eventType,                                  leaves the elements.                                        ❉ EVENTS / 5 KEYBOARD EVENTS                                    called.
.wrapInner( wrappingFunction )                            handler )
                                                     jQ                                                             jQ     .hover( handler(eventObject) )                              .keydown( handler(eventObject) )                                event.stopPropagation()
Wrap an HTML structure around the content of              Attach a handler to one or more events for all
each element in the set of matched elements.              elements that match the selector, now or in the                  Bind a single handler to the matched elements, to    jQ     Bind an event handler to the "keydown"                  jQ      Prevents the event from bubbling up the DOM
                                                          future, based on a specific set of root elements.                be executed when the mouse pointer enters or                JavaScript event, or trigger that event on an                   tree, preventing any parent handlers from
                                                                                                                           leaves the elements.                                        element.                                                        being notified of the event.
❉ MANIPULATION / 4. REPLACING                             .die()                                                           .mousedown( handler(eventObject) )                          .keypress( handler(eventObject) )                               event.target
                                                          Remove all event handlers previously attached             jQ                                                                                                                                                                                    El
.replaceWith( newContent )                                                                                                 Bind an event handler to the "mousedown"             jQ     Bind an event handler to the "keypress"                 jQ      The DOM element that initiated the event.
                                                          using .live() from the elements.                                 JavaScript event, or trigger that event on an               JavaScript event, or trigger that event on an
Replace each element in the set of matched           jQ
                                                                                                                           element.                                                    element.                                                        event.timeStamp
elements with the provided new content.                   .live( eventType, eventData, handler )
                                                                                                                           .mouseenter( handler(eventObject) )                         .keyup( handler(eventObject) )                                  This attribute returns the number of              Num
.replaceWith( function )                                  Attach a handler to the event for all elements            jQ                                                                                                                                 milliseconds since January 1, 1970, when the
                                                                                                                           Bind an event handler to be fired when the                  Bind an event handler to the "keyup" JavaScript         jQ
                                                     jQ   which match the current selector, now or in the                                                                       jQ                                                                     event is triggered.
Replace each element in the set of matched                future.                                                          mouse enters an element, or trigger that handler            event, or trigger that event on an element.
elements with the provided new content.                                                                                    on an element.
                                                                                                                                                                                                                                                       event.type
                                                                                                                                                                                                                                                                                                          Str
.replaceAll()                                             .one( eventType, [ eventData ], handler                                                                                      ❉ EVENTS / 6. EVENT OBJECT                                      Describes the nature of the event.
                                                                                                                           .mouseleave( handler(eventObject) )
                                                     jQ   (eventObject) )                                           jQ
A selector expression indicating which element(s)                                                                          Bind an event handler to be fired when the           jQ
                                                          Attach a handler to an event for the elements.                                                                               event.currentTarget                                             event.which
to replace.                                                                                                                mouse leaves an element, or trigger that handler
                                                          The handler is executed at most once per element.                on an element.                                              The current DOM element within the event                El      For key or button events, this attribute           Str
                                                                                                                                                                                       bubbling phase.                                                 indicates the specific button or key that was
❉ MANIPULATION / 5. REMOVING                                                                                               .mousemove( handler(eventObject) )                                                                                          pressed.
                                                          .trigger( eventType, extraParameters)
                                                                                                                    jQ     Bind an event handler to the "mousemove"
                                                                                                                                                                                       event.data
                                                          Execute all handlers and behaviors attached to                                                                        jQ
.detach( [ selector ] )                                   the matched elements for the given event type.                   JavaScript event, or trigger that event on an               Contains the optional data passed to
                                                     jQ                                                                    element.                                                    jQuery.fn.bind when the current executing                       ❉ EVENTS / 6. BROWSER EVENTS
Remove the set of matched elements from the                                                                                                                                            handler was bound.
DOM.                                                      .triggerHandler( eventType,                                      .mouseout( handler(eventObject) )                                                                                           .error( handler(eventObject) )
                                                          extraParameters )                                                                                                            event.isDefaultPrevented()                                                                                         jQ
.empty()                                                                                                            jQ     Bind an event handler to the "mouseout"              jQ                                                            0-1      Bind an event handler to the "error"
                                                          Execute all handlers attached to an element for                  JavaScript event, or trigger that event on an               Returns whether event.preventDefault() was                      JavaScript event.
Remove all child nodes of the set of matched         jQ                                                                                                                                ever called on this event object.
                                                          an event.                                                        element.
elements from the DOM.                                                                                                                                                                                                                                 .resize( handler(eventObject) )
                                                                                                                           .mouseover( handler(eventObject) )                          event.
.remove( [ selector ] )                                   .unbind( eventType, handler                                                                                                                                                                  Bind an event handler to the "resize"              jQ
                                                                                                                           Bind an event handler to the "mouseover"
                                                                                                                                                                                       isImmediatePropagationStopped()
                                                     jQ   (eventObject) )                                           jQ                                                          jQ                                                            0-1      JavaScript event, or trigger that event on an
Remove the set of matched elements from the                                                                                JavaScript event, or trigger that event on an               Returns whether                                                 element.
DOM.                                                      Remove a previously-attached event handler                       element.                                                    event.stopImmediatePropagation() was ever
                                                          from the elements.                                                                                                           called on this event object.                                    .scroll( handler(eventObject) )
                                                                                                                           .mouseup( handler(eventObject) )
❉ MANIPULATION / 6. COPYING                               .undelegate()                                                                                                                event.isPropagationStopped()                                    Bind an event handler to the "scroll"              jQ
                                                                                                                           Bind an event handler to the "mouseup"               jQ                                                            0-1      JavaScript event, or trigger that event on an
                                                          Remove a handler from the event for all elements                 JavaScript event, or trigger that event on an               Returns whether event.stopPropagation() was
                                                                                                                    jQ                                                                                                                                 element.
.clone( [ withDataAndEvents ] )                           which match the current selector, now or in the                  element.                                                    ever called on this event object.
                                                     jQ
Create a deep copy of the set of matched elements.        future, based upon a specific set of root elements.
jQUERY 1.5                                                 SELECTORS ✼ CORE ✼ ATTRIBUTES ✼ CSS ✼ TRAVERSING ✼ MANIPULATION ✼ EVENTS ✼ EFFECTS ✼ AJAX ✼ UTILITIES ✼ DEFERRED OBJECT
                                                                                                                                                     Designed by Antonio Lupetti © 2011 • http://woorkup.com • http://twitter.com/woork | jQuery is © of John Resig and the jQuery Team.
VISUAL CHEAT SHEET
                                                       = NEW IN jQUERY 1.5 /        f(x) = FUNCTION    /    a = ARRAY   / jQ = jQUERY    /   El = ELEMENT      /   0-1 = BOOLEAN   /   Obj = OBJECT       /   NUM = NUMBER       /    Str = STRING




❉ EFFECTS / 1. BASIC                                 .stop( [ clearQueue ], [ jumpToEnd ] )                        .ajaxStop( handler() )                                      jQuery.grep( array, function                                    jQuery.removeData( element,
                                                     Stop the currently-running animation on the            jQ     Hide a loading message after all the Ajax requests    jQ    (elementOfArray, indexInArray),                                 [ name ] )                                           jQ
.hide( duration, [ callback ] )                      matched elements.                                             have stopped.                                               [ invert ] )                                                    Remove a previously-stored piece of data.
                                                jQ                                                                                                                                                                                     a
Hide the matched elements.                           jQuery.fx.off                                                  .ajaxError( handler(event,                                  Finds the elements of an array which satisfy a
                                                                                                           0-1                                                                                                                                 jQuery.support
                                                                                                                   XMLHttpRequest, ajaxOptions,                                filter function. The original array is not
.show( duration, [ callback ] )                      Globally disable all animations.                                                                                          affected.                                                       A collection of properties that represent the       Obj
                                                jQ                                                                 thrownError) )                                        jQ
Display the matched elements.                                                                                                                                                                                                                  presence of different browser features or
                                                                                                                   Register a handler to be called when Ajax                   jQuery.inArray( value, array )                                  bugs.
                                                     ❉ AJAX / 1. LOW-LEVEL INTERFACE                               requests complete with an error.
                                                                                                                                                                               Search for a specified value within an array          Num
❉ EFFECTS / 2. SLIDING                                                                                                                                                                                                                         jQuery.trim( str )
                                                     jQuery.ajax( url, [ settings ] )                              .ajaxSend( handler(event,                                   and return its index (or -1 if not found).                                                                          Obj
                                                                                                                                                                                                                                               Remove the whitespace from the beginning
.slideDown( [ duration ], [ callback ] )                                                                           XMLHttpRequest, ajaxOptions) )                        jQ                                                                    and end of a string.
                                                     Perform an asynchronous HTTP (Ajax)              jqXHR                                                                    jQuery.isArray( obj )                                 0-1
Display the matched elements with a sliding     jQ   request.                                                      Show a message before an Ajax request is sent.
                                                                                                                                                                               Determine whether the argument is an array.                     jQuery.parseXML( data )
motion.
                                                     jQuery.ajax( settings )                                       .ajaxSuccess( handler(event,                                                                                                                                                XMLdoc
.slideToggle( [ duration ], [ callback ] )                                                                                                                                     jQuery.isEmptyObject( obj )                                     Parses a string into an XML document.
                                                     Perform an asynchronous HTTP (Ajax)              jqXHR
                                                                                                                   XMLHttpRequest, ajaxOptions) )                        jQ                                                          0-1
                                                jQ                                                                                                                             Check to see if an object is empty (contains no
Display or hide the matched elements with a          request.                                                      Show a message when an Ajax request completes               properties).                                                    jQuery.unique()
sliding motion.                                                                                                    successfully.                                                                                                                                                                    jQ
                                                     jQuery.ajaxSetup( option )                                                                                                                                                                Sorts an array of DOM elements, in place,
.slideUp( [ duration ], [ callback ] )                                                                     0-1                                                                 jQuery.isFunction( obj )                                        with the duplicates removed.
                                                     Set default values for future Ajax requests.                                                                                                                                    0-1
Hide the matched elements with a sliding        jQ                                                                 ❉ AJAX / 4. DATA                                            Determine if the argument passed is a
                                                                                                                                                                               Javascript function object.
motion.
                                                                                                                   .serialize()                                                                                                                ❉ DEFERRED OBJECT
                                                     ❉ AJAX / 2. SHORTHAND METHODS                                                                                             jQuery.isPlainObject( obj )
                                                                                                                   Encode a set of form elements as a string for        Str
❉ EFFECTS / 3. FADING                                                                                              submission.                                                 Check to see if an object is a plain object           0-1
                                                                                                                                                                                                                                               deferred.done( doneCallbacks )
                                                     jQuery.get( url, [ data ], [ callback(data,                                                                               (created using "{}" or "new Object").
                                                     textStatus, XMLHttpRequest) ],                                                                                                                                                            Add handlers to be called when the              Deferred
.fadeIn( [ duration ], [ callback ] )                                                                              .serializeArray()
                                                     [ dataType ] )                                                                                                                                                                            Deferred object is resolved.
Display the matched elements by fading them     jQ                                               jqXHR             Encode a set of form elements as an array of          a     jQuery.isXMLDoc( node )
to opaque.                                           Load data from the server using a HTTP GET                                                                                Check to see if a DOM node is within an XML           0-1       deferred.fail( failCallbacks )
                                                                                                                   names and values.
                                                     request.                                                                                                                  document (or is an XML document).                               Add handlers to be called when the              Deferred
.fadeOut( [ duration ], [ callback ] )
                                                     jQuery.getJSON( url, [ data ],                                                                                                                                                            Deferred object is rejected.
Hide the matched elements by fading them to     jQ                                                                 ❉ UTILITIES / 1. UTILITIES                                  jQuery.makeArray( obj )
transparent.                                         [ callback(data, textStatus) ] )                 jqXHR                                                                    Convert an array-like object into a true                a       deferred.isRejected()
                                                     Load JSON-encoded data from the server                        jQuery.browser                                              JavaScript array.                                               Determine whether a Deferred object has             0-1
.fadeTo( duration, opacity, [ callback ] )           using a GET HTTP request.
                                                jQ                                                                 Contains flags for the useragent, read from                                                                                 been rejected.
Adjust the opacity of the matched elements.                                                                        navigator.userAgent. While jQuery.browser will Map          jQuery.map( array, callback
                                                     jQuery.getScript( url, [ success(data,                        not be removed from future versions of jQuery,                                                                              deferred.isResolved()
                                                                                                                                                                               (elementOfArray, indexInArray) )                        a
                                                     textStatus) ] )                                  jqXHR        every effort to use jQuery.support and proper                                                                               Determine whether a Deferred object has             0-1
❉ EFFECTS / 4. CUSTOM                                Load a JavaScript file from the server using a                feature detection should be made.                           Translate all items in an array or array-like
                                                                                                                                                                                                                                               been resolved.
                                                                                                                                                                               object to another array of items.
                                                     GET HTTP request, then execute it.                            jQuery.browser.version
.animate( properties, options )                                                                                                                                                                                                                deferred.promise()
                                                                                                                                                                        Str    jQuery.merge( first, second )                                                                                   Promise
Perform a custom animation of a set of CSS      jQ   .load( url, [ data ], [ complete                              Returns the version number of the rendering                                                                                 Return a Deferred's Promise object.
                                                                                                                                                                               Merge the contents of two arrays together into          a
properties.                                          (responseText, textStatus,                                    engine for the user's browser.
                                                                                                                                                                               the first array.                                                deferred.reject( args )
                                                     XMLHttpRequest) ] )                                    jQ
                                                                                                                   jQuery.contains( container, contained )
.delay( duration, [ queueName ] )                                                                                                                                                                                                                                                              Deferred
                                                                                                                                                                                                                                               Reject a Deferred object and call any
Set a timer to delay execution of subsequent    jQ   Load data from the server and place the                       Check to see if a DOM node is within another         0-1    jQuery.noop()
                                                     returned HTML into the matched element.                                                                                                                                                   failCallbacks with the given args.
items in the queue.                                                                                                DOM node.                                                   An empty function.
                                                     jQuery.post( url, [ data ], [ success                                                                                                                                                     deferred.rejectWith( context,[args] )
.stop( [ clearQueue ], [ jumpToEnd ] )                                                                             jQuery.each( collection, callback                           jQuery.parseJSON( json )
                                                     (data, textStatus, XMLHttpRequest) ],                                                                                                                                                     Reject a Deferred object and call any           Deferred
Stop the currently-running animation on the     jQ                                                                 (indexInArray, valueOfElement) )                     Obj    Takes a well-formed JSON string and returns           Obj       failCallbacks with the given context and
                                                     [ dataType ] )                                   jqXHR
matched elements.                                                                                                  Iterates through the array displaying each                  the resulting JavaScript object.                                args.
                                                     Load data from the server using a HTTP POST                   number as both a word and numeral
jQuery.fx.off                                         request.                                                                                                                  jQuery.proxy( function, context )                               deferred.resolve( args )
                                               0-1
Globally disable all animations.                                                                                   jQuery.extend( target, [ object1 ],                         Takes a function and returns a new one that           f(x)      Resolve a Deferred object and call any          Deferred
                                                                                                                   [ objectN ] )                                        Obj    will always have a particular context.                          doneCallbacks with the given args.
                                                     ❉ AJAX / 3. AJAX EVENT HANDLERS                               Merge the contents of two or more objects
❉ EFFECTS / 4. CUSTOM                                                                                              together into the first object.                             jQuery.queue( element,                                          deferred.resolveWith( args )
                                                     .ajaxComplete( handler(event,                                                                                             [ queueName ] )                                         a
                                                                                                                                                                                                                                               Resolve a Deferred object and call any          Deferred
.animate( properties, options )                                                                                    jQuery.globalEval( code )                                                                                                   doneCallbacks with the given context and
                                                     XMLHttpRequest, ajaxOptions) )                         jQ                                                                 Show the queue of functions to be executed on
Perform a custom animation of a set of CSS      jQ                                                                                                                                                                                             args.
                                                                                                                   Execute some JavaScript code globally.                      the matched element.
properties.                                          Register a handler to be called when Ajax
                                                     requests complete.
                                                                                                                   jQuery.hasData( element )                                   jQuery.queue( element, queueName,                               deferred.then( doneCallbacks,
.delay( duration, [ queueName ] )                                                                                                                                                                                                              failCallbacks )
                                                     .ajaxStart( handler() )                                                                                            0-1    newQueue )                                              a
                                                                                                                                                                                                                                                                                               Deferred
Set a timer to delay execution of subsequent    jQ                                                                 Determine whether an element has any jQuery                                                                                 Add handlers to be called when the
                                                     Register a handler to be called when the first         jQ     data associated with it.                                    Show the queue of functions to be executed on
items in the queue.                                                                                                                                                                                                                            Deferred object is resolved or rejected.
                                                     Ajax request begins.                                                                                                      the matched element.

Weitere ähnliche Inhalte

Was ist angesagt?

Web Design & Development - Session 6
Web Design & Development - Session 6Web Design & Development - Session 6
Web Design & Development - Session 6Shahrzad Peyman
 
JavaScript Objects
JavaScript ObjectsJavaScript Objects
JavaScript ObjectsReem Alattas
 
3.1 javascript objects_DOM
3.1 javascript objects_DOM3.1 javascript objects_DOM
3.1 javascript objects_DOMJalpesh Vasa
 
Collection framework (completenotes) zeeshan
Collection framework (completenotes) zeeshanCollection framework (completenotes) zeeshan
Collection framework (completenotes) zeeshanZeeshan Khan
 
DataWeave 2.0 - MuleSoft CONNECT 2019
DataWeave 2.0 - MuleSoft CONNECT 2019DataWeave 2.0 - MuleSoft CONNECT 2019
DataWeave 2.0 - MuleSoft CONNECT 2019Sabrina Marechal
 
javascript objects
javascript objectsjavascript objects
javascript objectsVijay Kalyan
 
Refinement Types for Haskell
Refinement Types for HaskellRefinement Types for Haskell
Refinement Types for HaskellMartin Ockajak
 
Scala for Java Developers
Scala for Java DevelopersScala for Java Developers
Scala for Java DevelopersMartin Ockajak
 
Comparing Haskell & Scala
Comparing Haskell & ScalaComparing Haskell & Scala
Comparing Haskell & ScalaMartin Ockajak
 
Functional programming with Scala
Functional programming with ScalaFunctional programming with Scala
Functional programming with ScalaNeelkanth Sachdeva
 
Miles Sabin Introduction To Scala For Java Developers
Miles Sabin Introduction To Scala For Java DevelopersMiles Sabin Introduction To Scala For Java Developers
Miles Sabin Introduction To Scala For Java DevelopersSkills Matter
 

Was ist angesagt? (11)

Web Design & Development - Session 6
Web Design & Development - Session 6Web Design & Development - Session 6
Web Design & Development - Session 6
 
JavaScript Objects
JavaScript ObjectsJavaScript Objects
JavaScript Objects
 
3.1 javascript objects_DOM
3.1 javascript objects_DOM3.1 javascript objects_DOM
3.1 javascript objects_DOM
 
Collection framework (completenotes) zeeshan
Collection framework (completenotes) zeeshanCollection framework (completenotes) zeeshan
Collection framework (completenotes) zeeshan
 
DataWeave 2.0 - MuleSoft CONNECT 2019
DataWeave 2.0 - MuleSoft CONNECT 2019DataWeave 2.0 - MuleSoft CONNECT 2019
DataWeave 2.0 - MuleSoft CONNECT 2019
 
javascript objects
javascript objectsjavascript objects
javascript objects
 
Refinement Types for Haskell
Refinement Types for HaskellRefinement Types for Haskell
Refinement Types for Haskell
 
Scala for Java Developers
Scala for Java DevelopersScala for Java Developers
Scala for Java Developers
 
Comparing Haskell & Scala
Comparing Haskell & ScalaComparing Haskell & Scala
Comparing Haskell & Scala
 
Functional programming with Scala
Functional programming with ScalaFunctional programming with Scala
Functional programming with Scala
 
Miles Sabin Introduction To Scala For Java Developers
Miles Sabin Introduction To Scala For Java DevelopersMiles Sabin Introduction To Scala For Java Developers
Miles Sabin Introduction To Scala For Java Developers
 

Ähnlich wie JQuery

jQuery-Visual-Cheat-Sheet-1.4.2
jQuery-Visual-Cheat-Sheet-1.4.2jQuery-Visual-Cheat-Sheet-1.4.2
jQuery-Visual-Cheat-Sheet-1.4.2brecke
 
jQuery-Visual-Cheat-Sheet-1.4.2
jQuery-Visual-Cheat-Sheet-1.4.2jQuery-Visual-Cheat-Sheet-1.4.2
jQuery-Visual-Cheat-Sheet-1.4.2brecke
 
jQuery Visual Cheat Sheet (by WOORK)_1
jQuery Visual Cheat Sheet (by WOORK)_1jQuery Visual Cheat Sheet (by WOORK)_1
jQuery Visual Cheat Sheet (by WOORK)_1brecke
 
J query.1.3.visual.cheat.sheet.by.woork
J query.1.3.visual.cheat.sheet.by.woorkJ query.1.3.visual.cheat.sheet.by.woork
J query.1.3.visual.cheat.sheet.by.woorkSantosh Khalse
 
J query 1.7 cheat sheet
J query 1.7 cheat sheetJ query 1.7 cheat sheet
J query 1.7 cheat sheetmaamir farooq
 
J query 17-visual-cheat-sheet1
J query 17-visual-cheat-sheet1J query 17-visual-cheat-sheet1
J query 17-visual-cheat-sheet1sdcasas
 
VISUAL CHEAT SHEET
VISUAL CHEAT SHEETVISUAL CHEAT SHEET
VISUAL CHEAT SHEETDanilo Sousa
 
Unit 1 - What is jQuery_Why jQuery_Syntax_Selectors.pdf
Unit 1 - What is jQuery_Why jQuery_Syntax_Selectors.pdfUnit 1 - What is jQuery_Why jQuery_Syntax_Selectors.pdf
Unit 1 - What is jQuery_Why jQuery_Syntax_Selectors.pdfRAVALCHIRAG1
 
J Query Introduction And JQuery Selectors
J Query Introduction And JQuery SelectorsJ Query Introduction And JQuery Selectors
J Query Introduction And JQuery SelectorsAnand Kumar Rajana
 
react-slides.pdf gives information about react library
react-slides.pdf gives information about react libraryreact-slides.pdf gives information about react library
react-slides.pdf gives information about react libraryjanet736113
 
jQuery basics for Beginners
jQuery basics for BeginnersjQuery basics for Beginners
jQuery basics for BeginnersPooja Saxena
 
jQuery - Tips And Tricks
jQuery - Tips And TricksjQuery - Tips And Tricks
jQuery - Tips And TricksLester Lievens
 

Ähnlich wie JQuery (18)

jQuery-Visual-Cheat-Sheet-1.4.2
jQuery-Visual-Cheat-Sheet-1.4.2jQuery-Visual-Cheat-Sheet-1.4.2
jQuery-Visual-Cheat-Sheet-1.4.2
 
jQuery-Visual-Cheat-Sheet-1.4.2
jQuery-Visual-Cheat-Sheet-1.4.2jQuery-Visual-Cheat-Sheet-1.4.2
jQuery-Visual-Cheat-Sheet-1.4.2
 
jQuery Visual Cheat Sheet (by WOORK)_1
jQuery Visual Cheat Sheet (by WOORK)_1jQuery Visual Cheat Sheet (by WOORK)_1
jQuery Visual Cheat Sheet (by WOORK)_1
 
J query 17-visual-cheat-sheet
J query 17-visual-cheat-sheetJ query 17-visual-cheat-sheet
J query 17-visual-cheat-sheet
 
Jquery
JqueryJquery
Jquery
 
J query.1.3.visual.cheat.sheet.by.woork
J query.1.3.visual.cheat.sheet.by.woorkJ query.1.3.visual.cheat.sheet.by.woork
J query.1.3.visual.cheat.sheet.by.woork
 
J query 1.5-visual-cheat-sheet
J query 1.5-visual-cheat-sheetJ query 1.5-visual-cheat-sheet
J query 1.5-visual-cheat-sheet
 
J query 1.7 cheat sheet
J query 1.7 cheat sheetJ query 1.7 cheat sheet
J query 1.7 cheat sheet
 
J query 17-visual-cheat-sheet1
J query 17-visual-cheat-sheet1J query 17-visual-cheat-sheet1
J query 17-visual-cheat-sheet1
 
VISUAL CHEAT SHEET
VISUAL CHEAT SHEETVISUAL CHEAT SHEET
VISUAL CHEAT SHEET
 
Unit 1 - What is jQuery_Why jQuery_Syntax_Selectors.pdf
Unit 1 - What is jQuery_Why jQuery_Syntax_Selectors.pdfUnit 1 - What is jQuery_Why jQuery_Syntax_Selectors.pdf
Unit 1 - What is jQuery_Why jQuery_Syntax_Selectors.pdf
 
J Query Introduction And JQuery Selectors
J Query Introduction And JQuery SelectorsJ Query Introduction And JQuery Selectors
J Query Introduction And JQuery Selectors
 
react-slides.pdf
react-slides.pdfreact-slides.pdf
react-slides.pdf
 
react-slides.pdf gives information about react library
react-slides.pdf gives information about react libraryreact-slides.pdf gives information about react library
react-slides.pdf gives information about react library
 
jQuery basics for Beginners
jQuery basics for BeginnersjQuery basics for Beginners
jQuery basics for Beginners
 
react-slides.pptx
react-slides.pptxreact-slides.pptx
react-slides.pptx
 
jQuery - Tips And Tricks
jQuery - Tips And TricksjQuery - Tips And Tricks
jQuery - Tips And Tricks
 
Java Collections
Java  Collections Java  Collections
Java Collections
 

JQuery

  • 1. jQUERY 1.5 SELECTORS ✼ CORE ✼ ATTRIBUTES ✼ CSS ✼ TRAVERSING ✼ MANIPULATION ✼ EVENTS ✼ EFFECTS ✼ AJAX ✼ UTILITIES ✼ DEFERRED OBJECT Designed by Antonio Lupetti © 2011 • http://woorkup.com • http://twitter.com/woork | jQuery is © of John Resig and the jQuery Team. VISUAL CHEAT SHEET = NEW IN jQUERY 1.5 / f(x) = FUNCTION / a = ARRAY / jQ = jQUERY / El = ELEMENT / 0-1 = BOOLEAN / Obj = OBJECT / NUM = NUMBER / Str = STRING ❉ SELECTORS / 1. BASIC :header Selector [name!=value] :file Selector .get( [ index ] ) a<El(s)> Selects all elements that are headers, like a<El(s)> Select elements that either don't have the Selects all elements of type file. Retrieve the DOM elements matched by the El | a a<El(s)> All Selector (“*”) h1, h2, h3 and so on. specified attribute, or do have the specified jQuery object. <El(s)> :image Selector Selects all elements. attribute but not with a certain value. a<El(s)> :last Selector Selects all elements of type image. .index() a<El> [name^=value] Class Selector (“.class”) Selects the last matched element. Search for a given element from among the Num a<El(s)> :input Selector Matches all elements with the given name. Selects elements that have the specified a<El(s)> matched elements. :lt() Selector attribute with a value beginning exactly Selects all input, textarea, select and button a<El(s)> Element Selector (“element”) a<El(s)> with a given string. elements. .length Select all elements at an index less than Num Selects all elements with the given tag a<El(s)> index within the matched set. The number of elements in the jQuery object. [name] :password Selector name. a<El(s)> :not() Selector Selects elements that have the specified a<El(s)> Selects all elements of type password. .selector ID Selector (“#id”) Selects all elements that do not match the a<El(s)> attribute, with any value. A selector representing selector originally Str Selects a single element with the given id a<El> given selector. :radio Selector passed to jQuery(). [name=value][name2=value2] a<El(s)> attribute. Selects all elements of type radio. :odd Selector Matches elements that match all of the a<El(s)> .size() Multiple Selector (“selector1, Selects odd elements, zero-indexed. See a<El(s)> specified attribute filters. :reset Selector Return the number of DOM elements matched Num a<El(s)> selector2, selectorN”) a<El(s)> also even. Selects all elements of type reset. by the jQuery object. Selects the combined results of all the ❉ SELECTORS / 6. CHILD FILTER :selected Selector .toArray() specified selectors. a<El(s)> ❉ SELECTORS / 4. CONTENT FILTER Selects all elements that are selected. Retrieve all the DOM elements contained in the a :first-child Selector jQuery set, as an array. :contains() Selector Selects all elements that are the first child a<El(s)> :submit Selector ❉ SELECTORS / 2. HIERARCHY a<El(s)> Select all elements that contain the a<El(s)> of their parent. Selects all elements of type submit. Child Selector (“parent > child”) specified text. ❉ CORE / 3. DATA :last-child Selector Selects all direct child elements specified by a<El(s)> :text Selector :empty Selector Selects all elements that are the last child of a<El(s)> a<El(s)> .queue( [ queueName ], newQueue) "child" of elements specified by "parent". Selects all elements of type text. a<El(s)> their parent. Show the queue of functions to be executed on jQ Select all elements that have no children Descendant Selector (“ancestor (including text nodes). :nth-child Selector the matched elements. descendant”) ❉ CORE / 1. THE jQUERY FUNCTION a<El(s)> :has() Selector Selects all elements that are the nth-child of a<El(s)> .data( obj ) Selects all elements that are descendants of a<El(s)> their parent. jQ Selects elements which contain at least one jQuery() Store arbitrary data associated with the a given ancestor. matched elements. element that matches the specified selector. :only-child Selector Accepts a string containing a CSS selector jQ Next Adjacent Selector (“prev + a<El(s)> which is then used to match a set of .removeData( [ name ] ) :parent Selector Selects all elements that are the only child jQ next”) elements. Select all elements that are the parent of a<El(s)> of their parent. Remove a previously-stored piece of data. a<El(s)> Selects all next elements matching "next" another element, including text nodes. jQuery.sub() that are immediately preceded by a sibling .dequeue( [ queueName ] ) "prev". ❉ SELECTORS / 7. VISIBILITY FILTER Creates a new copy of jQ whose properties jQ jQ Execute the next function on the queue for the ❉ SELECTORS / 5. ATTRIBUTE and methods can be modified without matched elements. Next Siblings Selector (“prev ~ :hidden Selector affecting the original jQuery object. a<El(s)> siblings”) [name|=value] Selects all elements that are hidden. a<El(s)> jQuery.when() ❉ CORE / 4. INTEROPERABILITY Selects all sibling elements that follow after Selects elements that have the specified the "prev" element, have the same parent, a<El(s)> :visible Selector Provides a way to execute callback functions attribute with a value either equal to a a<El(s)> Deferred and match the filtering "siblings" selector. given string or starting with that string Selects all elements that are visible. based on one or more objects, usually jQuery.fn.extend( object ) followed by a hyphen (-). Deferred objects that represent Extends the jQuery element set to provide new jQ asynchronous events. methods (used to make a typical jQuery ❉ SELECTORS / 3. BASIC FILTER [name*=value] ❉ SELECTORS / 8. FORM plugin). Selects elements that have the specified jQuery.noConflict( ) a<El(s)> :animated Selector attribute with a value containing the a :button Selector Relinquish jQuery's control of the $ Obj jQuery.extend( object ) jQ Select all elements that are in the progress a<El(s)> given substring. Selects all button elements and elements of a<El(s)> variable. Extends the jQuery object itself. of an animation at the time the selector is type button. run. [name~=value] jQuery.extend( object ) jQ Selects elements that have the specified a<El(s)> :checkbox Selector Extends the jQuery object itself. ❉ ATTRIBUTES / 1. ATTR :eq() Selector a<El(s)> attribute with a value containing a given Selects all elements of type checkbox. Select the element at index n within the a<El> word, delimited by spaces. .attr( attributeName ) matched set. :checked Selector ❉ CORE / 2. OBJECT ACCESSORS Get the value of an attribute for the first Obj [name$=value] a<El(s)> Matches all elements that are checked. element in the set of matched elements. :even Selector Selects elements that have the specified .context a<El(s)> a<El(s)> Selects even elements, zero-indexed attribute with a value ending exactly with :disabled Selector The DOM node context originally passed to El .attr( attributeName, value ) a<El(s)> a given string. Selects all elements that are disabled. jQuery(). Set one or more attributes for the set of Obj :first Selector matched elements. a<El> [name=value] Selects the first matched element. :enabled Selector .each( function(index, Element) ) a<El(s)> a<El(s)> .removeAttr() Selects all elements that are headers, like Iterate over a jQ object, executing a function jQ Selects all elements that are enabled. :gt() Selector h1, h2, h3 and so on. for each matched element. Remove an attribute from each element in the jQ Select all elements at an index greater than a<El(s)> set of matched elements. index within the matched set.
  • 2. jQUERY 1.5 SELECTORS ✼ CORE ✼ ATTRIBUTES ✼ CSS ✼ TRAVERSING ✼ MANIPULATION ✼ EVENTS ✼ EFFECTS ✼ AJAX ✼ UTILITIES ✼ DEFERRED OBJECT Designed by Antonio Lupetti © 2011 • http://woorkup.com • http://twitter.com/woork | jQuery is © of John Resig and the jQuery Team. VISUAL CHEAT SHEET = NEW IN jQUERY 1.5 / f(x) = FUNCTION / a = ARRAY / jQ = jQUERY / El = ELEMENT / 0-1 = BOOLEAN / Obj = OBJECT / NUM = NUMBER / Str = STRING ❉ ATTRIBUTES / 2. CLASS ❉ CSS / 2. POSITIONING .width( value ) .next( [ selector ] ) .andSelf() jQ Add the previous set of elements on the stack to jQ Set the CSS width of each element in the set of Get the immediately following sibling of each jQ .addClass( class ) .scrollLeft() matched elements. element in the set of matched elements, optionally the current set. Adds the specified class(es) to each of the set of jQ Get the current horizontal position of the filtered by a selector. Int matched elements. scroll bar for the first element in the set of .width() .contents() matched elements. Int .nextAll( [ selector ] ) Get the children of each element in the set of jQ .hasClass( class ) Get the current computed width for the first element in the set of matched elements. matched elements, including text nodes. 0-1 .scrollLeft( value ) Get all following siblings of each element in the jQ Determine whether any of the matched set of matched elements, optionally filtered by a elements are assigned the given class. Set the current horizontal position of the .end() jQ selector. scroll bar for each of the set of matched ❉ TRAVERSING / 1. FILTERING End the most recent filtering operation in the jQ .removeClass( class ) elements. current chain and return the set of matched .nextUntil( [ selector ] ) Remove a single class, multiple classes, or all jQ elements to its previous state. .offset() .eq( - index ) Get all following siblings of each element up to jQ classes from each element in the set of matched Obj Reduce the set of matched elements to the one at jQ but not including the element matched by the elements. Get the current coordinates of the first element in the set of matched elements, {top, left} the specified index. selector. ❉ MANIPULATION / 1. INSIDE .toggleClass( class, switch ) relative to the document. Add or remove one or more classes from each .eq( index ) .offsetParent() .append( content ) element in the set of matched elements, jQ .offset( coordinates ) Reduce the set of matched elements to the one at jQ jQ Insert content, specified by the parameter, to the Get the closest ancestor element that is jQ depending on either the class's presence or the Set the current coordinates of every element jQ the specified index. positioned. end of each element in the set of matched value of the switch argument. in the set of matched elements, relative to elements. the document. .filter( selector ) jQ .parent( [ selector ] ) .append( function(index, html) ) .position() Reduce the set of matched elements to those that ❉ ATTRIBUTES / 3. HTML match the selector or pass the function's test. Get the parent of each element in the current set jQ Insert content, specified by the parameter, to the jQ Obj Get the current coordinates of the first of matched elements, optionally filtered by a end of each element in the set of matched .html() element in the set of matched elements, {top, left} selector. elements. .is( selector ) Str relative to the offset parent. Get the HTML contents of the first element in Check the current matched set of elements 0-1 .appendTo( target ) the set of matched elements. .parents( [ selector ] ) .scrollTop() against a selector and return true if at least one Insert every element in the set of matched jQ of these elements matches the selector. Get the ancestors of each element in the current jQ .html( htmlString ) Get the current vertical position of the scroll Int set of matched elements, optionally filtered by a elements to the end of the target. jQ bar for the first element in the set of selector. Set the HTML contents of each element in the matched elements. .map( callback(index, domEl) ) .prepend( content ) set of matched elements. Pass each element in the current matched set jQ .parentsUntil( [ selector ] ) Insert content, specified by the parameter, to the jQ .scrollTop( value ) through a function, producing a new jQuery beginning of each element in the set of matched Set the current vertical position of the scroll object containing the return values. Get the ancestors of each element in the current jQ elements. ❉ ATTRIBUTES / 4. TEXT bar for each of the set of matched elements. set of matched elements, up to but not including .not() the element matched by the selector. .prependTo( target ) .text() jQ Remove elements from the set of matched .prev( [ selector ] ) Insert content, specified by the parameter, to the jQ Get the combined text contents of each element Str ❉ CSS / 3. HEIGHT & WIDTH elements. end of each element in the set of matched in the set of matched elements, including their Get the immediately preceding sibling of each jQ elements. descendants. .height( value ) .slice( start, [ end ] ) element in the set of matched elements, optionally Set the CSS height of every matched jQ filtered by a selector. .text( textString ) Reduce the set of matched elements to a subset jQ element. ❉ MANIPULATION / 2. OUTSIDE jQ specified by a range of indices. .prevAll( [ selector ] ) Set the content of each element in the set of matched elements to the specified text. .height() Get all preceding siblings of each element in the jQ .after( content ) Int set of matched elements, optionally filtered by a jQ Get the current computed height for the first ❉ TRAVERSING / 2. TREE TRAVERSAL Insert content, specified by the parameter, after element in the set of matched elements. selector. each element in the set of matched elements. ❉ ATTRIBUTES / 5. VALUE .innerHeight() .children( [ selector ] ) .prevUntil( [ selector ] ) .after( function(index) ) .val() Get the current computed height for the first Int Get the children of each element in the set of jQ Get the ancestors of each element in the current Insert content, specified by the parameter, to the Str | jQ jQ Get the current value of the first element in the element in the set of matched elements, matched elements, optionally filtered by a set of matched elements, optionally filtered by a end of each element in the set of matched a set of matched elements. including padding but not border. selector. selector. elements. .val( value ) .innerWidth() .closest( selector ) .siblings( [ selector ] ) .before( content ) Set the value of each element in the set of jQ Get the current computed width for the first Int Get the first ancestor element that matches the Insert content, specified by the parameter, before jQ jQ Get the siblings of each element in the set of jQ matched elements. element in the set of matched elements, selector, beginning at the current element and matched elements, optionally filtered by a each element in the set of matched elements. including padding but not border. progressing up through the DOM tree. selector. .before( function ) .outerHeight() .closest( selectors, [ context ] ) Insert content, specified by the parameter, before jQ ❉ CSS / 1. CSS Get the current computed height for the first ❉ TRAVERSING / 3. MISCELLANEOUS each element in the set of matched elements. Int Get the first ancestor element that matches the jQ element in the set of matched elements, selector, beginning at the current element and .css( propertyName ) including padding, border, and optionally .add() .insertAfter( target ) progressing up through the DOM tree. jQ Get the value of a style property for the first Str margin. jQ Add elements to the set of matched elements. Insert every element in the set of matched element in the set of matched elements. .find( selector ) elements after the target. .outerWidth() .add( selectors, [ context ] ) .css( propertyName, value ) Get the current computed width for the first Get the descendants of each element in the jQ jQ .insertBefore( target ) Int Add elements to the set of matched elements. Set one or more CSS properties for the set of jQ element in the set of matched elements, current set of matched elements, filtered by a jQ selector. Insert every element in the set of matched matched elements. including padding and border. elements before the target.
  • 3. jQUERY 1.5 SELECTORS ✼ CORE ✼ ATTRIBUTES ✼ CSS ✼ TRAVERSING ✼ MANIPULATION ✼ EVENTS ✼ EFFECTS ✼ AJAX ✼ UTILITIES ✼ DEFERRED OBJECT Designed by Antonio Lupetti © 2011 • http://woorkup.com • http://twitter.com/woork | jQuery is © of John Resig and the jQuery Team. VISUAL CHEAT SHEET = NEW IN jQUERY 1.5 / f(x) = FUNCTION / a = ARRAY / jQ = jQUERY / El = ELEMENT / 0-1 = BOOLEAN / Obj = OBJECT / NUM = NUMBER / Str = STRING ❉ MANIPULATION / 3. AROUND ❉ EVENTS / 1. DOCUMENT LOADING ❉ EVENTS / 3. MOUSE EVENTS ❉ EVENTS / 4. FORM EVENTS event.pageX The mouse position relative to the left edge of Num .unwrap() .click( handler(eventObject) ) .blur( handler(eventObject) ) the document. .load( handler(eventObject) ) Bind an event handler to the "click" JavaScript jQ Bind an event handler to the "blur" JavaScript jQ Remove the parents of the set of matched Bind an event handler to the "load" JavaScript jQ jQ event, or trigger that event on an element. event.pageY elements from the DOM, leaving the matched event. event, or trigger that event on an element. The mouse position relative to the top edge of Num elements in their place. .change( handler(eventObject) ) .dblclick( handler(eventObject) ) the document. .ready( handler ) Bind an event handler to the "change" .wrap( wrappingElement ) Bind an event handler to the "dblclick" jQ jQ Specify a function to execute when the DOM is jQ JavaScript event, or trigger that event on an jQ JavaScript event, or trigger that event on an event.preventDefault() Wrap an HTML structure around each element in fully loaded. element. element. If this method is called, the default action the set of matched elements. of the event will not be triggered. .unload( handler(eventObject) ) .focusin( handler(eventObject) ) .focus( handler(eventObject) ) .wrap( wrappingFunction ) jQ jQ Bind an event handler to the "focus" JavaScript jQ event.relatedTarget Bind an event handler to the "unload" JavaScript Bind an event handler to the "focusin" JavaScript Wrap an HTML structure around each element in jQ event. event. event, or trigger that event on an element. The other DOM element involved in the event, El the set of matched elements. if any. .select( handler(eventObject) ) .focusout( handler(eventObject) ) Bind an event handler to the "select" JavaScript jQ .wrapAll( wrappingElement ) jQ event.result ❉ EVENTS / 2. HANDLER ATTACHMENT Bind an event handler to the "focusout" event, or trigger that event on an element. Wrap an HTML structure around all elements in jQ JavaScript event. This attribute contains the last value returned Obj the set of matched elements. .bind( eventType, [ eventData ], handler .submit( handler(eventObject) ) by an event handler that was triggered by thisAnything .hover( handlerIn(eventObject), jQ event, unless the value was undefined. .wrapInner( wrappingElement ) (eventObject) ) jQ handlerOut(eventObject) ) Bind an event handler to the "submit" JavaScript Attach a handler to an event for the elements. jQ event, or trigger that event on an element. Wrap an HTML structure around the content of jQ Bind two handlers to the matched elements, to be event.stopImmediatePropagation() each element in the set of matched elements. executed when the mouse pointer enters and Prevents other event handlers from being .delegate( selector, eventType, leaves the elements. ❉ EVENTS / 5 KEYBOARD EVENTS called. .wrapInner( wrappingFunction ) handler ) jQ jQ .hover( handler(eventObject) ) .keydown( handler(eventObject) ) event.stopPropagation() Wrap an HTML structure around the content of Attach a handler to one or more events for all each element in the set of matched elements. elements that match the selector, now or in the Bind a single handler to the matched elements, to jQ Bind an event handler to the "keydown" jQ Prevents the event from bubbling up the DOM future, based on a specific set of root elements. be executed when the mouse pointer enters or JavaScript event, or trigger that event on an tree, preventing any parent handlers from leaves the elements. element. being notified of the event. ❉ MANIPULATION / 4. REPLACING .die() .mousedown( handler(eventObject) ) .keypress( handler(eventObject) ) event.target Remove all event handlers previously attached jQ El .replaceWith( newContent ) Bind an event handler to the "mousedown" jQ Bind an event handler to the "keypress" jQ The DOM element that initiated the event. using .live() from the elements. JavaScript event, or trigger that event on an JavaScript event, or trigger that event on an Replace each element in the set of matched jQ element. element. event.timeStamp elements with the provided new content. .live( eventType, eventData, handler ) .mouseenter( handler(eventObject) ) .keyup( handler(eventObject) ) This attribute returns the number of Num .replaceWith( function ) Attach a handler to the event for all elements jQ milliseconds since January 1, 1970, when the Bind an event handler to be fired when the Bind an event handler to the "keyup" JavaScript jQ jQ which match the current selector, now or in the jQ event is triggered. Replace each element in the set of matched future. mouse enters an element, or trigger that handler event, or trigger that event on an element. elements with the provided new content. on an element. event.type Str .replaceAll() .one( eventType, [ eventData ], handler ❉ EVENTS / 6. EVENT OBJECT Describes the nature of the event. .mouseleave( handler(eventObject) ) jQ (eventObject) ) jQ A selector expression indicating which element(s) Bind an event handler to be fired when the jQ Attach a handler to an event for the elements. event.currentTarget event.which to replace. mouse leaves an element, or trigger that handler The handler is executed at most once per element. on an element. The current DOM element within the event El For key or button events, this attribute Str bubbling phase. indicates the specific button or key that was ❉ MANIPULATION / 5. REMOVING .mousemove( handler(eventObject) ) pressed. .trigger( eventType, extraParameters) jQ Bind an event handler to the "mousemove" event.data Execute all handlers and behaviors attached to jQ .detach( [ selector ] ) the matched elements for the given event type. JavaScript event, or trigger that event on an Contains the optional data passed to jQ element. jQuery.fn.bind when the current executing ❉ EVENTS / 6. BROWSER EVENTS Remove the set of matched elements from the handler was bound. DOM. .triggerHandler( eventType, .mouseout( handler(eventObject) ) .error( handler(eventObject) ) extraParameters ) event.isDefaultPrevented() jQ .empty() jQ Bind an event handler to the "mouseout" jQ 0-1 Bind an event handler to the "error" Execute all handlers attached to an element for JavaScript event, or trigger that event on an Returns whether event.preventDefault() was JavaScript event. Remove all child nodes of the set of matched jQ ever called on this event object. an event. element. elements from the DOM. .resize( handler(eventObject) ) .mouseover( handler(eventObject) ) event. .remove( [ selector ] ) .unbind( eventType, handler Bind an event handler to the "resize" jQ Bind an event handler to the "mouseover" isImmediatePropagationStopped() jQ (eventObject) ) jQ jQ 0-1 JavaScript event, or trigger that event on an Remove the set of matched elements from the JavaScript event, or trigger that event on an Returns whether element. DOM. Remove a previously-attached event handler element. event.stopImmediatePropagation() was ever from the elements. called on this event object. .scroll( handler(eventObject) ) .mouseup( handler(eventObject) ) ❉ MANIPULATION / 6. COPYING .undelegate() event.isPropagationStopped() Bind an event handler to the "scroll" jQ Bind an event handler to the "mouseup" jQ 0-1 JavaScript event, or trigger that event on an Remove a handler from the event for all elements JavaScript event, or trigger that event on an Returns whether event.stopPropagation() was jQ element. .clone( [ withDataAndEvents ] ) which match the current selector, now or in the element. ever called on this event object. jQ Create a deep copy of the set of matched elements. future, based upon a specific set of root elements.
  • 4. jQUERY 1.5 SELECTORS ✼ CORE ✼ ATTRIBUTES ✼ CSS ✼ TRAVERSING ✼ MANIPULATION ✼ EVENTS ✼ EFFECTS ✼ AJAX ✼ UTILITIES ✼ DEFERRED OBJECT Designed by Antonio Lupetti © 2011 • http://woorkup.com • http://twitter.com/woork | jQuery is © of John Resig and the jQuery Team. VISUAL CHEAT SHEET = NEW IN jQUERY 1.5 / f(x) = FUNCTION / a = ARRAY / jQ = jQUERY / El = ELEMENT / 0-1 = BOOLEAN / Obj = OBJECT / NUM = NUMBER / Str = STRING ❉ EFFECTS / 1. BASIC .stop( [ clearQueue ], [ jumpToEnd ] ) .ajaxStop( handler() ) jQuery.grep( array, function jQuery.removeData( element, Stop the currently-running animation on the jQ Hide a loading message after all the Ajax requests jQ (elementOfArray, indexInArray), [ name ] ) jQ .hide( duration, [ callback ] ) matched elements. have stopped. [ invert ] ) Remove a previously-stored piece of data. jQ a Hide the matched elements. jQuery.fx.off .ajaxError( handler(event, Finds the elements of an array which satisfy a 0-1 jQuery.support XMLHttpRequest, ajaxOptions, filter function. The original array is not .show( duration, [ callback ] ) Globally disable all animations. affected. A collection of properties that represent the Obj jQ thrownError) ) jQ Display the matched elements. presence of different browser features or Register a handler to be called when Ajax jQuery.inArray( value, array ) bugs. ❉ AJAX / 1. LOW-LEVEL INTERFACE requests complete with an error. Search for a specified value within an array Num ❉ EFFECTS / 2. SLIDING jQuery.trim( str ) jQuery.ajax( url, [ settings ] ) .ajaxSend( handler(event, and return its index (or -1 if not found). Obj Remove the whitespace from the beginning .slideDown( [ duration ], [ callback ] ) XMLHttpRequest, ajaxOptions) ) jQ and end of a string. Perform an asynchronous HTTP (Ajax) jqXHR jQuery.isArray( obj ) 0-1 Display the matched elements with a sliding jQ request. Show a message before an Ajax request is sent. Determine whether the argument is an array. jQuery.parseXML( data ) motion. jQuery.ajax( settings ) .ajaxSuccess( handler(event, XMLdoc .slideToggle( [ duration ], [ callback ] ) jQuery.isEmptyObject( obj ) Parses a string into an XML document. Perform an asynchronous HTTP (Ajax) jqXHR XMLHttpRequest, ajaxOptions) ) jQ 0-1 jQ Check to see if an object is empty (contains no Display or hide the matched elements with a request. Show a message when an Ajax request completes properties). jQuery.unique() sliding motion. successfully. jQ jQuery.ajaxSetup( option ) Sorts an array of DOM elements, in place, .slideUp( [ duration ], [ callback ] ) 0-1 jQuery.isFunction( obj ) with the duplicates removed. Set default values for future Ajax requests. 0-1 Hide the matched elements with a sliding jQ ❉ AJAX / 4. DATA Determine if the argument passed is a Javascript function object. motion. .serialize() ❉ DEFERRED OBJECT ❉ AJAX / 2. SHORTHAND METHODS jQuery.isPlainObject( obj ) Encode a set of form elements as a string for Str ❉ EFFECTS / 3. FADING submission. Check to see if an object is a plain object 0-1 deferred.done( doneCallbacks ) jQuery.get( url, [ data ], [ callback(data, (created using "{}" or "new Object"). textStatus, XMLHttpRequest) ], Add handlers to be called when the Deferred .fadeIn( [ duration ], [ callback ] ) .serializeArray() [ dataType ] ) Deferred object is resolved. Display the matched elements by fading them jQ jqXHR Encode a set of form elements as an array of a jQuery.isXMLDoc( node ) to opaque. Load data from the server using a HTTP GET Check to see if a DOM node is within an XML 0-1 deferred.fail( failCallbacks ) names and values. request. document (or is an XML document). Add handlers to be called when the Deferred .fadeOut( [ duration ], [ callback ] ) jQuery.getJSON( url, [ data ], Deferred object is rejected. Hide the matched elements by fading them to jQ ❉ UTILITIES / 1. UTILITIES jQuery.makeArray( obj ) transparent. [ callback(data, textStatus) ] ) jqXHR Convert an array-like object into a true a deferred.isRejected() Load JSON-encoded data from the server jQuery.browser JavaScript array. Determine whether a Deferred object has 0-1 .fadeTo( duration, opacity, [ callback ] ) using a GET HTTP request. jQ Contains flags for the useragent, read from been rejected. Adjust the opacity of the matched elements. navigator.userAgent. While jQuery.browser will Map jQuery.map( array, callback jQuery.getScript( url, [ success(data, not be removed from future versions of jQuery, deferred.isResolved() (elementOfArray, indexInArray) ) a textStatus) ] ) jqXHR every effort to use jQuery.support and proper Determine whether a Deferred object has 0-1 ❉ EFFECTS / 4. CUSTOM Load a JavaScript file from the server using a feature detection should be made. Translate all items in an array or array-like been resolved. object to another array of items. GET HTTP request, then execute it. jQuery.browser.version .animate( properties, options ) deferred.promise() Str jQuery.merge( first, second ) Promise Perform a custom animation of a set of CSS jQ .load( url, [ data ], [ complete Returns the version number of the rendering Return a Deferred's Promise object. Merge the contents of two arrays together into a properties. (responseText, textStatus, engine for the user's browser. the first array. deferred.reject( args ) XMLHttpRequest) ] ) jQ jQuery.contains( container, contained ) .delay( duration, [ queueName ] ) Deferred Reject a Deferred object and call any Set a timer to delay execution of subsequent jQ Load data from the server and place the Check to see if a DOM node is within another 0-1 jQuery.noop() returned HTML into the matched element. failCallbacks with the given args. items in the queue. DOM node. An empty function. jQuery.post( url, [ data ], [ success deferred.rejectWith( context,[args] ) .stop( [ clearQueue ], [ jumpToEnd ] ) jQuery.each( collection, callback jQuery.parseJSON( json ) (data, textStatus, XMLHttpRequest) ], Reject a Deferred object and call any Deferred Stop the currently-running animation on the jQ (indexInArray, valueOfElement) ) Obj Takes a well-formed JSON string and returns Obj failCallbacks with the given context and [ dataType ] ) jqXHR matched elements. Iterates through the array displaying each the resulting JavaScript object. args. Load data from the server using a HTTP POST number as both a word and numeral jQuery.fx.off request. jQuery.proxy( function, context ) deferred.resolve( args ) 0-1 Globally disable all animations. jQuery.extend( target, [ object1 ], Takes a function and returns a new one that f(x) Resolve a Deferred object and call any Deferred [ objectN ] ) Obj will always have a particular context. doneCallbacks with the given args. ❉ AJAX / 3. AJAX EVENT HANDLERS Merge the contents of two or more objects ❉ EFFECTS / 4. CUSTOM together into the first object. jQuery.queue( element, deferred.resolveWith( args ) .ajaxComplete( handler(event, [ queueName ] ) a Resolve a Deferred object and call any Deferred .animate( properties, options ) jQuery.globalEval( code ) doneCallbacks with the given context and XMLHttpRequest, ajaxOptions) ) jQ Show the queue of functions to be executed on Perform a custom animation of a set of CSS jQ args. Execute some JavaScript code globally. the matched element. properties. Register a handler to be called when Ajax requests complete. jQuery.hasData( element ) jQuery.queue( element, queueName, deferred.then( doneCallbacks, .delay( duration, [ queueName ] ) failCallbacks ) .ajaxStart( handler() ) 0-1 newQueue ) a Deferred Set a timer to delay execution of subsequent jQ Determine whether an element has any jQuery Add handlers to be called when the Register a handler to be called when the first jQ data associated with it. Show the queue of functions to be executed on items in the queue. Deferred object is resolved or rejected. Ajax request begins. the matched element.