jQuery 1.3 Cheat Sheet

Document Sample
jQuery 1.3 Cheat Sheet
jQuery 1.3 Cheat Sheet

Core Selectors

jQuery Function Basic Attribute Filters

FUNCTION RETURNS SELECTOR RETURNS SELECTOR RETURNS

2

$(expr, [context]) jQuery * Array [attr] Array

2

$(html, [owner]) jQuery #id Array [attr=value] Array

2

$(elems) jQuery name Array [attr!=value] Array

2

$(func) jQuery .class Array [attr^=value] Array

2

selector1, selectorN Array [attr$=value] Array

jQuery Object Accessors

2

PROPERTY RETURNS [attr*=value] Array

selector 1

String Hierarchy

2

SELECTOR RETURNS [attr1][attr2][attrN] Array

1

context Element ancestor descendant Array 2) The [@attr] style selectors were removed in jQuery 1.3



length Number parent > child Array Child Filters

FUNCTION RETURNS SELECTOR RETURNS

previous + next Array

size() Number :nth-child(index | even | odd | Array

previous ~ siblings Array equation)

eq(index) jQuery

:first-child Array

get() Array Basic Filters

SELECTOR RETURNS :last-child Array

get(index) Element :first Array

:only-child Array

index(element) Number :last Array

each(func) jQuery :not(selector) Array Forms

SELECTOR RETURNS

1) New in jQuery 1.3

:even Array :hidden Array

Data

FUNCTION RETURNS :odd Array :input Array

data(name) Object :eq(index) Array :text Array

data(name, value) jQuery :gt(index) Array :password Array

removeData(name) jQuery :lt(index) Array :checkbox Array

queue(name) Array :header Array :radio Array

queue(name, func) jQuery :animated Array :image Array

queue(name, queue) jQuery :file Array

Content Filters

dequeue(name) jQuery SELECTOR RETURNS :button Array

:contains(text) Array

Plugins :submit Array

FUNCTION RETURNS :empty Array

:reset Array

$.fn.extend(object) jQuery :has(selector) Array

$.extend(object) jQuery :parent Array Form Filters

SELECTOR RETURNS



Interoperability :enabled Array

FUNCTION RETURNS

Visibility Filters

SELECTOR RETURNS :disabled Array

$.noConflict() jQuery :hidden Array

:checked Array

$.noConflict(extreme) jQuery :visible Array

:selected Array





Attributes Manipulation Traversing

Attr Insert Inside Filtering

FUNCTION RETURNS FUNCTION RETURNS FUNCTION RETURNS



attr(name) Object append(content) jQuery filter(expr) jQuery

attr(props) jQuery appendTo(selector) jQuery filter(func) jQuery

attr(key, value | func) jQuery prepend(content) jQuery is(expr) Boolean

removeAttr(name) jQuery prependTo(selector) jQuery map(func) jQuery

not(expr) jQuery

Class Insert Outside

FUNCTION RETURNS FUNCTION RETURNS slice(start, [end]) jQuery

hasClass(class) Boolean after(content) jQuery

addClass(class) jQuery before(content) jQuery Finding

FUNCTION RETURNS



removeClass([class]) jQuery insertAfter(content) jQuery add(expr) jQuery

toggleClass(class) jQuery insertBefore(content) jQuery children([expr]) jQuery

toggleClass(class, switch) jQuery closest([expr]) jQuery

Insert Around

FUNCTION RETURNS contents() jQuery

HTML wrap(html | element) jQuery

FUNCTION RETURNS find(expr) jQuery

html() String wrapAll(html | element) jQuery

next([expr]) jQuery

html(value) jQuery wrapInner(html | elem) jQuery

nextAll([expr]) jQuery

Text Replace prev([expr]) jQuery

FUNCTION RETURNS FUNCTION RETURNS



text() String replaceWith(content) jQuery prevAll([expr]) jQuery



text(value) jQuery replaceAll(selector) jQuery offsetParent() jQuery

parent([expr]) jQuery

Value Remove

FUNCTION RETURNS FUNCTION RETURNS parents([expr]) jQuery

val() String, Array empty() jQuery siblings([expr]) jQuery

val(value) jQuery remove([expr]) jQuery

Chaining

FUNCTION RETURNS

Copy

FUNCTION RETURNS andSelf() jQuery

clone([events]) jQuery end() jQuery





Legend

SYNTAX DESCRIPTION SYNTAX DESCRIPTION SYNTAX DESCRIPTION SYNTAX DESCRIPTION



function functions or properties argument arguments | one argument only [] optional argument

jQuery 1.3 Cheat Sheet

Events CSS Utilities

Page Load CSS Browser & Feature Detection

FUNCTION RETURNS FUNCTION RETURNS PROPERTY RETURNS

5

ready(func) jQuery css(name) String $.browser Map

5

css(props) jQuery $.browser.version String

Event Handling

5

FUNCTION RETURNS css(name, value) jQuery $.boxModel Boolean

bind(type, [data], func) jQuery 6

$.support.boxModel Boolean

one(type, [data], func) jQuery Position

6

FUNCTION RETURNS $.support.cssFloat Boolean

trigger(event, [data]) jQuery offset() Object {top, left} 6

$.support.hrefNormalized Boolean

triggerHandler(event, [data]) Object position() Object {top, left} 6

$.support.htmlSerialize Boolean

unbind([type], [data]) jQuery scrollTop() Integer 6

$.support.leadingWhitespace Boolean

scrollTop(value) jQuery

Live Events $.support.noCloneEvent 6

Boolean

FUNCTION RETURNS scrollLeft() Integer 6

live(type, func) 3

jQuery $.support.objectAll Boolean

scrollLeft(value) jQuery 6

die([type], [func]) 3

jQuery $.support.opacity Boolean

Dimension $.support.scriptEval 6

Boolean

Interaction Helpers FUNCTION RETURNS

6

FUNCTION RETURNS width() Integer $.support.style Boolean

hover(over, out) jQuery $.support.tbody 6

Boolean

width(value) jQuery

toggle(func1, func2, ..., [funcN]) jQuery 5) Deprecated in jQuery 1.3

height() Integer 6) New in jQuery 1.3



Event Helpers height(value) jQuery Array & Object Operations

FUNCTION RETURNS FUNCTION RETURNS



blur([func]) 4

jQuery innerWidth() Integer $.each(object, func) Object

change([func]) 4

jQuery innerHeight() Integer $.extend([deep], target, object1, Object

4 outerWidth([options]) Integer ..., [objectN])

click([func]) jQuery

4 outerHeight([options]) Integer $.grep(array, func, [invert]) Array

dblclick([func]) jQuery

4 $.makeArray(object) Array

error([func]) jQuery

4 Effects $.map(array, func) Array

focus([func]) jQuery

4

Basic $.inArray(value, array) Number

keydown([func]) jQuery FUNCTION RETURNS



4 show() jQuery $.merge(first, second) Array

keypress([func]) jQuery

4 show(speed, [func]) jQuery $.unique(array) Array

keyup([func]) jQuery

load(func) jQuery hide() jQuery Test Operations

FUNCTION RETURNS

mousedown(func) jQuery hide(speed, [func]) jQuery

$.isArray(object) Boolean

mousemove(func) jQuery toggle() jQuery

$.isFunction(object) Boolean

mouseout(func) jQuery toggle(switch) jQuery

toggle(speed, [func]) jQuery String Operations

mouseover(func) jQuery FUNCTION RETURNS



mouseup(func) jQuery $.trim(string) String

Sliding

FUNCTION RETURNS

resize(func) jQuery URLs

slideDown(speed, [func]) jQuery FUNCTION RETURNS

scroll(func) jQuery

slideUp(speed, [func]) jQuery $.param(object) String

4

select([func]) jQuery

slideToggle(speed, [func]) jQuery

4

submit([func]) jQuery Ajax

unload(func) jQuery Fading

FUNCTION RETURNS Requests

3) New in jQuery 1.3 FUNCTION RETURNS

4) Omitting the value triggers the events on each matched element fadeIn(speed, [func]) jQuery

$.ajax(options) XMLHttpRequest

Event Object fadeOut(speed, [func]) jQuery

PROPERTY RETURNS

load(url, [data], [func]) jQuery

fadeTo(speed, opacity, [func]) jQuery

type String $.get(url, [data], [func], [type]) XMLHttpRequest

target Element Custom $.post(url, [data], [func], [type]) XMLHttpRequest

FUNCTION RETURNS

relatedTarget Element animate(params, [duration], $.getJSON(url, [data], [func]) XMLHttpRequest

jQuery

currentTarget Element [easing], [func]) $.getScript(url, [func]) XMLHttpRequest

pageX String animate(params, options) jQuery

Events

pageY String stop([clearQueue], [gotoEnd]) jQuery FUNCTION RETURNS



ajaxComplete([func]) jQuery

result Object Settings

PROPERTY RETURNS ajaxSuccess([func]) jQuery

timeStamp Number

FUNCTION RETURNS

$.fx.off Boolean ajaxError([func]) jQuery

preventDefault() Undefined ajaxSend([func]) jQuery

isDefaultPrevented() Boolean ajaxStart([func]) jQuery

stopPropagation() Undefined ajaxStop([func]) jQuery

isPropagationStopped() Boolean

Miscellaneous

stopImmediatePropagation() Undefined FUNCTION RETURNS



isImmediatePropagationStopped() Boolean $.ajaxSetup(options) jQuery

serialize() String

serializeArray() Array





Legend

SYNTAX DESCRIPTION SYNTAX DESCRIPTION SYNTAX DESCRIPTION SYNTAX DESCRIPTION



function functions or properties argument arguments | one argument only [] optional argument


Share This Document


Related docs
Other docs by Jared Azuma
P
Views: 8  |  Downloads: 0
The DCM Entertainment Newsletter
Views: 2  |  Downloads: 0
Dcms alliance newsletter
Views: 2  |  Downloads: 0
by registering with docstoc.com you agree to our
privacy policy

You are almost ready to download!

You are almost ready to download!