Reading a list won't make them stick. ShortcutFoo has you type each shortcut, then brings it back just before you'd forget it.
Attributes
10 shortcuts- .addClassAdds the specified class(es) to each of the set of matched elements
- .attrGet the value of an attribute for the first element in the set of matched elements or set one or more attributes for every matched element
- .hasClassDetermine whether any of the matched elements are assigned the given class
- .htmlGet the HTML contents of the first element in the set of matched elements or set the HTML contents of every matched element
- .propGet the value of a property for the first element in the set of matched elements or set one or more properties for every matched element
- .removeAttrRemove an attribute from each element in the set of matched elements
- .removeClassRemove a single class, multiple classes, or all classes from each element in the set of matched elements
- .removePropRemove a property for the set of matched elements
- .toggleClassAdd or remove one or more classes from each element in the set of matched elements, depending on either the class’s presence or the value of the switch argument
- .valGet the current value of the first element in the set of matched elements or set the value of every matched element
Effects I
11 shortcuts- .animatePerform a custom animation of a set of CSS properties
- .fadeInDisplay the matched elements by fading them to opaque
- .fadeOutHide the matched elements by fading them to transparent
- .fadeToAdjust the opacity of the matched elements
- .fadeToggleDisplay or hide the matched elements by animating their opacity
- .hideHide the matched elements
- .showDisplay the matched elements
- .slideDownDisplay the matched elements with a sliding motion
- .slideToggleDisplay or hide the matched elements with a sliding motion
- .slideUpHide the matched elements with a sliding motion
- .toggleDisplay or hide the matched elements
Effects II
8 shortcuts- .clearQueueRemove from the queue all items that have not yet been run
- .delaySet a timer to delay execution of subsequent items in the queue
- .dequeueExecute the next function on the queue for the matched elements
- .finishStop the currently-running animation, remove all queued animations, and complete all animations for the matched elements
- $.fx.intervalThe rate (in milliseconds) at which animations fire
- $.fx.offGlobally disable all animations
- .queueShow or manipulate the queue of functions to be executed on the matched elements
- .stopStop the currently-running animation on the matched elements
Traversing I
15 shortcuts- .addAdd elements to the set of matched elements
- .addBackAdd the previous set of elements on the stack to the current set, optionally filtered by a selector
- .andSelfAdd the previous set of elements on the stack to the current set
- .childrenGet the children of each element in the set of matched elements, optionally filtered by a selector
- .closestFor each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree
- .contentsGet the children of each element in the set of matched elements, including text and comment nodes
- .eachIterate over a jQuery object, executing a function for each matched element
- .endEnd the most recent filtering operation in the current chain and return the set of matched elements to its previous state
- .eqReduce the set of matched elements to the one at the specified index
- .filterReduce the set of matched elements to those that match the selector or pass the function’s test
- .findGet the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
- .firstReduce the set of matched elements to the first in the set
- .hasReduce the set of matched elements to those that have a descendant that matches the selector or DOM element
- .isCheck the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments
- .lastReduce the set of matched elements to the final one in the set
Traversing II
14 shortcuts- .mapPass each element in the current matched set through a function, producing a new jQuery object containing the return values
- .nextGet the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector
- .nextAllGet all following siblings of each element in the set of matched elements, optionally filtered by a selector
- .nextUntilGet all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed
- .notRemove elements from the set of matched elements
- .offsetParentGet the closest ancestor element that is positioned
- .parentGet the parent of each element in the current set of matched elements, optionally filtered by a selector
- .parentsGet the ancestors of each element in the current set of matched elements, optionally filtered by a selector.
- .parentsUntilGet the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object
- .prevGet the immediately preceding sibling of each element in the set of matched elements, optionally filtered by a selector
- .prevAllGet all preceding siblings of each element in the set of matched elements, optionally filtered by a selector
- .prevUntilGet all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object
- .siblingsGet the siblings of each element in the set of matched elements, optionally filtered by a selector
- .sliceReduce the set of matched elements to a subset specified by a range of indices
Selectors I
20 shortcuts- "*"Selects all elements
- :animatedSelect all elements that are in the progress of an animation at the time the selector is run
- name|="value"Attribute contains prefix selector
- name*="value"Attribute contains selector
- name`="value"Attribute contains word selector
- name$="value"Attribute ends with selector
- name="value"Attribute equals selector
- name!="value"Attribute not equal selector
- name^="value"Attribute starts with selector
- :buttonSelects all button elements and elements of type button
- :checkboxSelects all elements of type checkbox
- :checkedMatches all elements that are checked or selected
- "parent>child"Child selector
- ".class"Class selector
- :containsSelect all elements that contain the specified text
- "ancestor descendant"Selects all elements that are descendants of a given ancestor
- :disabledSelects all elements that are disabled
- "element"Element selector
- :emptySelect all elements that have no children (including text nodes)
- :enabledSelects all elements that are enabled
Selectors II
20 shortcuts- :eqSelect the element at index n within the matched set
- :evenSelects even elements, zero-indexed. See also odd
- :fileSelects all elements of type file
- :first-childSelects all elements that are the first child of their parent
- :first-of-typeSelects all elements that are the first among siblings of the same element name
- :firstSelects the first matched element
- :focusSelects element if it is currently focused
- :gtSelect all elements at an index greater than index within the matched set
- :hasSelects elements which contain at least one element that matches the specified selector
- :headerSelects all elements that are headers, like h1, h2, h3 and so on
- :hiddenSelects all elements that are hidden
- "#id"Selects a single element with the given id attribute
- :imageSelects all elements of type image
- :inputSelects all input, textarea, select and button elements
- [name]Has Attribute Selector
- :langSelects all elements of the specified language
- :last-childSelects all elements that are the last child of their parent
- :last-of-typeSelects all elements that are the last among siblings of the same element name
- :lastSelects the last matched element
- :itSelect all elements at an index less than index within the matched set
Selectors III
21 shortcuts- name="value", name2="Value2"Multiple attribute selector
- "selector1, selector2,selectorN"Multiple Selectors
- "prev+next"Next adjacent selector
- "prev`siblings"Next siblings selector
- :notSelects all elements that do not match the given selector
- :nth-childSelects all elements that are the nth-child of their parent
- :nth-last-of-typeSelects all elements that are the nth-child of their parent, counting from the last element to the first
- :nth-of-typeSelects all elements that are the nth child of their parent in relation to siblings with the same element name
- :oddSelects odd elements, zero-indexed. See also even
- :only-childSelects all elements that are the only child of their parent
- :only-of-typeSelects all elements that have no siblings with the same element name
- :parentSelect all elements that have at least one child node (either an element or text
- :passwordSelects all elements of type password
- :radioSelects all elements of type radio
- :resetSelects all elements of type reset
- :rootSelects the element that is the root of the document
- :selectedSelects all elements that are selected
- :submitSelects all elements of type submit
- :targetSelects the target element indicated by the fragment identifier of the document’s URI
- :textSelects all elements of type text
- :visibleSelects all elements that are visible
Ajax
15 shortcuts- .ajaxCompleteRegister a handler to be called when Ajax requests complete
- .ajaxErrorRegister a handler to be called when Ajax requests complete with an error.
- .ajaxSendAttach a function to be executed before an Ajax request is sent
- .ajaxStartRegister a handler to be called when the first Ajax request begins
- .ajaxStopRegister a handler to be called when all Ajax requests have completed
- .ajaxSuccessAttach a function to be executed whenever an Ajax request completes successfully
- $.ajaxPerform an asynchronous HTTP (Ajax) request
- $.ajaxPrefilterHandle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax()
- $.ajaxSetupSet default values for future Ajax requests. Its use is not recommended
- $.ajaxTransportCreates an object that handles the actual transmission of Ajax data
- $.getLoad data from the server using a HTTP GET request
- $.getJSONLoad JSON-encoded data from the server using a GET HTTP request
- $.getScriptLoad a JavaScript file from the server using a GET HTTP request, then execute it
- $.postLoad data from the server using a HTTP POST request
- .loadLoad data from the server and place the returned HTML into the matched element
Properties
6 shortcuts- .contextThe DOM node context originally passed to jQuery(); if none was passed then context will likely be the document
- .jqueryA string containing the jQuery version number
- $.browserContains flags for the useragent, read from navigator.userAgent. This property was removed in jQuery 1.9 and is available only through the jQuery.migrate plugin. Please try to use feature detection instead
- $.supportA collection of properties that represent the presence of different browser features or bugs
- .lengthThe number of elements in the jQuery object
- .selectorA selector representing selector passed to jQuery(), if any, when creating the original set
Manipulation I
12 shortcuts- .afterInsert content, specified by the parameter, after each element in the set of matched elements
- .appendInsert content, specified by the parameter, to the end of each element in the set of matched elements
- .beforeInsert content, specified by the parameter, before each element in the set of matched elements
- .cloneCreate a deep copy of the set of matched elements
- .cssGet the value of a style property for the first element in the set of matched elements or set one or more CSS properties for every matched element
- .emptyRemove all child nodes of the set of matched elements from the DOM
- .heightGet the current computed height for the first element in the set of matched elements or set the height of every matched element
- .innerHeightGet the current computed inner height (including padding but not border) for the first element in the set of matched elements or set the inner height of every matched element
- .innerWidthGet the current computed inner width (including padding but not border) for the first element in the set of matched elements or set the inner width of every matched element
- .insertAfterInsert every element in the set of matched elements after the target
- .insertBeforeInsert every element in the set of matched elements before the target
- .outerHeightGet the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns a number (without “px”) representation of the value or null if called on an empty set of elements
Manipulation II
13 shortcuts- .outerWidthGet the current computed width for the first element in the set of matched elements, including padding and border
- .prependInsert content, specified by the parameter, to the beginning of each element in the set of matched elements
- .prependToInsert every element in the set of matched elements to the beginning of the target
- .removeRemove the set of matched elements from the DOM
- .replaceAllReplace each target element with the set of matched elements
- .replaceWithReplace each element in the set of matched elements with the provided new content and return the set of elements that was removed
- .scrollLeftGet the current horizontal position of the scroll bar for the first element in the set of matched elements or set the horizontal position of the scroll bar for every matched element
- .textGet the combined text contents of each element in the set of matched elements, including their descendants, or set the text contents of the matched elements
- .unwrapRemove the parents of the set of matched elements from the DOM, leaving the matched elements in their place
- .widthGet the current computed width for the first element in the set of matched elements or set the width of every matched element
- .wrapWrap an HTML structure around each element in the set of matched elements
- .wrapAllWrap an HTML structure around all elements in the set of matched elements
- .wrapInnerWrap an HTML structure around the content of each element in the set of matched elements
Events I
18 shortcuts- .bindAttach a handler to an event for the elements
- .clickBind an event handler to the “click” JavaScript event, or trigger that event on an element
- .dblclickBind an event handler to the “dblclick” JavaScript event, or trigger that event on an element
- .delegateAttach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements
- .dieRemove event handlers previously attached using .live() from the elements
- .errorBind an event handler to the “error” JavaScript event
- event.currentTargetThe current DOM element within the event bubbling phase
- event.dataAn optional object of data passed to an event method when the current executing handler is bound
- event.delegateTargetThe element where the currently-called jQuery event handler was attached
- event.isDefaultPreventedReturns whether event.preventDefault() was ever called on this event object
- event.isImmediatePropagationStoppedReturns whether event.stopImmediatePropagation() was ever called on this event object
- event.isPropagationStoppedReturns whether event.stopPropagation() was ever called on this event object
- event.metaKeyIndicates whether the META key was pressed when the event fired
- event.namespaceThe namespace specified when the event was triggered
- event.pageXThe mouse position relative to the left edge of the document
- event.pageYThe mouse position relative to the top edge of the document
- event.preventDefaultIf this method is called, the default action of the event will not be triggered
- event.relatedTargetThe other DOM element involved in the event, if any
Events II
18 shortcuts- event.resultThe last value returned by an event handler that was triggered by this event, unless the value was undefined
- event.stopImmediatePropagationKeeps the rest of the handlers from being executed and prevents the event from bubbling up the DOM tree
- event.stopPropagationPrevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event
- event.targetThe DOM element that initiated the event
- event.timeStampThe difference in milliseconds between the time the browser created the event and January 1, 1970
- event.typeDescribes the nature of the event
- event.whichFor key or mouse events, this property indicates the specific key or button that was pressed
- .focusinBind an event handler to the “focusin” event
- .focusoutBind an event handler to the “focusout” JavaScript event
- .hoverBind one or two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements
- .keydownBind an event handler to the “keydown” JavaScript event, or trigger that event on an element
- .keypressBind an event handler to the “keypress” JavaScript event, or trigger that event on an element
- .keyupBind an event handler to the “keyup” JavaScript event, or trigger that event on an element
- .liveAttach an event handler for all elements which match the current selector, now and in the future
- .loadBind an event handler to the “load” JavaScript event
- .mousedownBind an event handler to the “mousedown” JavaScript event, or trigger that event on an element
- .mouseenterBind an event handler to be fired when the mouse enters an element, or trigger that handler on an element
- .mouseleaveBind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element
Events III
16 shortcuts- .mousemoveBind an event handler to the “mousemove” JavaScript event, or trigger that event on an element
- .mouseoutBind an event handler to the “mouseout” JavaScript event, or trigger that event on an element
- .mouseoverBind an event handler to the “mouseover” JavaScript event, or trigger that event on an element
- .mouseupBind an event handler to the “mouseup” JavaScript event, or trigger that event on an element
- .offRemove an event handler
- .onAttach an event handler function for one or more events to the selected elements
- .oneAttach a handler to an event for the elements. The handler is executed at most once per element per event type
- .readySpecify a function to execute when the DOM is fully loaded
- .resizeBind an event handler to the “resize” JavaScript event, or trigger that event on an element
- .scrollBind an event handler to the “scroll” JavaScript event, or trigger that event on an element
- .toggleBind two or more handlers to the matched elements, to be executed on alternate clicks
- .triggerExecute all handlers and behaviors attached to the matched elements for the given event type
- .triggerHandlerExecute all handlers attached to an element for an event
- .unbindRemove a previously-attached event handler from the elements
- .undelegateRemove a handler from the event for all elements which match the current selector, based upon a specific set of root elements
- .unloadBind an event handler to the “unload” JavaScript event
Forms
7 shortcuts- .blurBind an event handler to the “blur” JavaScript event, or trigger that event on an element
- .changeBind an event handler to the “change” JavaScript event, or trigger that event on an element
- .focusBind an event handler to the “focus” JavaScript event, or trigger that event on an element
- .selectBind an event handler to the “select” JavaScript event, or trigger that event on an element
- .serializeEncode a set of form elements as a string for submission
- .serializeArrayEncode a set of form elements as an array of names and values
- .submitBind an event handler to the “submit” JavaScript event, or trigger that event on an element
Utilities I
15 shortcuts- $.containsCheck to see if a DOM element is a descendant of another DOM element
- $.dataStore arbitrary data associated with the specified element and/or return the value that was set
- $.dequeueExecute the next function on the queue for the matched element
- $.eachIterator function used to iterate over both objects or arrays
- $.extendMerge the contents of two or more objects together into the first object
- $.fn.extendMerge the contents of an object onto the jQuery prototype to provide new jQuery instance methods
- $.globalEvalExecute some JavaScript code globally
- $.grepFinds the elements of an array which satisfy a filter function. The original array is not affected
- $.inArraySearch for a specified value within an array and return its index (or -1 if not found)
- $.isArrayDetermine whether the argument is an array
- $.isEmptyObjectCheck to see if an object is empty (contains no enumerable properties)
- $.isFunctionDetermine if the argument passed is a Javascript function object
- $.isNumericDetermines whether its argument is a number
- $.isPlainObjectCheck to see if an object is a plain object (created using “{}” or “new Object”)
- $.isWindowDetermine whether the argument is a window
Utilities II
15 shortcuts- $.isXMLDocCheck to see if a DOM node is within an XML document (or is an XML document)
- $.makeArrayConvert an array-like object into a true JavaScript array
- $.mapTranslate all items in an array or object to new array of items
- $.mergeMerge the contents of two arrays together into the first array
- $.noopAn empty function
- $.nowReturn a number representing the current time
- $.parseHTMLParses a string into an array of DOM nodes
- $.parseJSONTakes a well-formed JSON string and returns the resulting JavaScript object
- $.parseXMLParses a string into an XML document
- $.proxyTakes a function and returns a new one that will always have a particular context
- $.queueShow or manipulate the queue of functions to be executed on the matched element
- $.removeDataRemove a previously-stored piece of data
- $.trimRemove the whitespace from the beginning and end of a string
- $.typeDetermine the internal JavaScript [[Class]] of an object
- $.uniqueSorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers
Deferred Objects
19 shortcuts- deferred.alwaysAdd handlers to be called when the Deferred object is either resolved or rejected
- deferred.doneAdd handlers to be called when the Deferred object is resolved
- deferred.failAdd handlers to be called when the Deferred object is rejected
- deferred.isRejectedDetermine whether a Deferred object has been rejected
- deferred.isResolvedDetermine whether a Deferred object has been resolved
- deferred.notifyCall the progressCallbacks on a Deferred object with the given args
- deferred.notifyWithCall the progressCallbacks on a Deferred object with the given context and args
- deferred.pipeUtility method to filter and/or chain Deferreds
- deferred.progressAdd handlers to be called when the Deferred object generates progress notifications
- deferred.promiseReturn a Deferred’s Promise object
- deferred.rejectReject a Deferred object and call any failCallbacks with the given args
- deferred.rejectWithReject a Deferred object and call any failCallbacks with the given context and args
- deferred.resolveResolve a Deferred object and call any doneCallbacks with the given args
- deferred.resolveWithResolve a Deferred object and call any doneCallbacks with the given context and args
- deferred.stateDetermine the current state of a Deferred object
- deferred.thenAdd handlers to be called when the Deferred object is resolved, rejected, or still in progress
- $.DeferredA constructor function that returns a chainable utility object with methods to register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function
- $.whenProvides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events
- .promiseReturn a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished
Callbacks Object
12 shortcuts- callbacks.addAdd a callback or a collection of callbacks to a callback list
- callbacks.disableDisable a callback list from doing anything more
- callbacks.disabledDetermine if the callbacks list has been disabled
- callbacks.emptyRemove all of the callbacks from a list
- callbacks.fireCall all of the callbacks with the given arguments
- callbacks.firedDetermine if the callbacks have already been called at least once
- callbacks.fireWithCall all callbacks in a list with the given context and arguments
- callbacks.hasDetermine whether a supplied callback is in a list
- callbacks.lockLock a callback list in its current state
- callbacks.lockedDetermine if the callbacks list has been locked
- callbacks.removeRemove a callback or a collection of callbacks from a callback list
- $.CallbacksA multi-purpose callbacks list object that provides a powerful way to manage callback lists
Miscellaneous
19 shortcuts- $.holdReadyHolds or releases the execution of jQuery’s ready event
- $()Return a collection of matched elements either found in the DOM based on passed argument(s) or created by passing an HTML string
- $.subCreates a new copy of jQuery whose properties and methods can be modified without affecting the original jQuery object
- $.cssHooksHook directly into jQuery to override how particular CSS properties are retrieved or set, normalize CSS property naming, or create custom properties
- $.hasDataDetermine whether an element has any jQuery data associated with it
- $.queueShow or manipulate the queue of functions to be executed on the matched element.
- $.errorTakes a string and throws an exception containing it
- .pushStackAdd a collection of DOM elements onto the jQuery stack
- .dataStore arbitrary data associated with the matched elements or return the value at the named data store for the first element in the set of matched elements
- .getRetrieve the DOM elements matched by the jQuery object
- .indexSearch for a given element from among the matched elements
- $.noConflictRelinquish jQuery’s control of the $ variable
- $.paramCreate a serialized representation of an array or object, suitable for use in a URL query string or Ajax request
- .sizeReturn the number of elements in the jQuery object
- .toArrayRetrieve all the elements contained in the jQuery set, as an array
- .offsetGet the current coordinates of the first element, or set the coordinates of every element, in the set of matched elements, relative to the document
- .positionGet the current coordinates of the first element in the set of matched elements, relative to the offset parent
- .scrollLeftGet the current horizontal position of the scroll bar for the first element in the set of matched elements or set the horizontal position of the scroll bar for every matched element.
- .scrollTopGet the current vertical position of the scroll bar for the first element in the set of matched elements or set the vertical position of the scroll bar for every matched element