Jquery Cheetsheet

Only available on StudyMode
  • Topic: Document Object Model, JQuery, JavaScript
  • Pages : 32 (4616 words )
  • Download(s) : 113
  • Published : February 4, 2013
Open Document
Text Preview
jQUERY 1.4.2
VISUAL CHEAT SHEET
= NEW IN jQUERY 1.4.x / ❉ = DEPRECATED /

SELECTORS ✼ CORE ✼ ATTRIBUTES ✼ CSS ✼ TRAVERSING ✼ MANIPULATION ✼ EVENTS ✼ EFFECTS ✼ AJAX ✼ UTILITIES

a = ARRAY

/ jQ = jQUERY

/

El = ELEMENT

/

0-1 = BOOLEAN

/

Obj = OBJECT

/

NUM = NUMBER

/

Str = STRING

❉ SELECTORS / 1. BASIC All Selector (“*”)
Selects all elements. a

:first Selector
Selects the first matched element.

a

[name$=value]
Selects elements that have the specified attribute with a value ending exactly with a given string. a

:checked Selector
Matches all elements that are checked.

a

.index()
Search for a given element from among the matched elements. Num

:gt() Selector
Select all elements at an index greater than index within the matched set. a

:disabled Selector
Selects all elements that are disabled. a

Class Selector (“.class”)
Matches all elements with the given name.

[name=value]
Selects all elements that are headers, like h1, h2, h3 and so on.

a

.length
The number of elements in the jQuery object.

Num

a

:header Selector
a Selects all elements that are headers, like h1, h2, h3 and so on. a

:enabled Selector
Selects all elements that are enabled.

a

Element Selector (“element”)
Selects all elements with the given tag name.

[name!=value]
Select elements that either don't have the specified attribute, or do have the specified attribute but not with a certain value. a

.selector
A selector representing selector originally passed to jQuery().

Str

:file Selector
Selects all elements of type file.

ID Selector (“#id”)
Selects a single element with the given id attribute. a

:last Selector
Selects the last matched element.

a

a

.size()
a Return the number of DOM elements matched by the jQuery object.

:lt() Selector
Select all elements at an index less than index within the matched set. a a

[name^=value]
Selects elements that have the specified attribute with a value beginning exactly with a given string. a

:image Selector
Selects all elements of type image.

Num

Multiple Selector (“selector1, selector2, selectorN”)
Selects the combined results of all the specified selectors.

:input Selector
a Selects all input, textarea, select and button elements. a

.toArray()
Retrieve all the DOM elements contained in the jQuery set, as an array. a

:not() Selector
Selects all elements that do not match the given selector. a

[name]
Selects elements that have the specified attribute, with any value.

:password Selector
Selects all elements of type password. a

a

❉ SELECTORS / 2. HIERARCHY Child Selector (“parent > child”) Selects all direct child elements specified by "child" of elements specified by "parent". a

:odd Selector
Selects odd elements, zero-indexed. See also even. a

[name=value][name2=value2]
Matches elements that match all of the specified attribute filters.

❉ CORE / 3. DATA
a

:radio Selector
Selects all elements of type radio.

.queue( [ queueName ], newQueue)
Show the queue of functions to be executed on the matched elements. jQ

❉ SELECTORS / 4. CONTENT FILTER :contains() Selector
a Select all elements that contain the specified text. a

❉ SELECTORS / 6. CHILD FILTER :first-child Selector
Selects all elements that are the first child of their parent. a

:reset Selector
Selects all elements of type reset.

a

.data( obj )
a Store arbitrary data associated with the matched elements. jQ

Descendant Selector (“ancestor descendant”)
Selects all elements that are descendants of a given ancestor.

:selected Selector
Selects all elements that are selected.

:empty Selector
Select all elements that have no children (including text nodes). a a

:last-child Selector
Selects all elements that are the last child of their parent. a

:submit Selector
Selects all elements of type submit.

a

.removeData( [ name ] )
Remove a...
tracking img