jquery_1.3_cheatsheet_v1.pdf

(34 KB) Pobierz
Visio-jquery_1.3_cheatsheet_v1.vsd
jQuery 1.3 Cheat Sheet
Core
Selectors
jQuery Function
Basic
Attribute Filters
[ attr ] 2
FUNCTION
RETURNS
SELECTOR
RETURNS
SELECTOR
RETURNS
$( expr , [ context ] )
jQuery
jQuery
jQuery
jQuery
*
Array<Element>
Array<Element>
Array<Element>
Array<Element>
Array<Element>
Array<Element>
Array<Element>
$( html , [ owner ] )
# id
[ attr = value ]
2
$( elems )
$( func )
name
[ attr != value ]
2
Array<Element>
. class
selector1, selectorN
[ attr ^= value ]
2
Array<Element>
[ attr $= value ]
2
Array<Element>
jQuery Object Accessors
PROPERTY
RETURNS
[ attr *= value ] 2
Array<Element>
Hierarchy
ancestor descendant
selector 1
context 1
String
Element
SELECTOR
RETURNS
[ attr1 ][ attr2 ][ attrN ]
2
Array<Element>
Array<Element>
Array<Element>
Array<Element>
Array<Element>
2) The [@attr] style selectors were removed in jQuery 1.3
length
Number
parent > child
Child Filters
:nth-child( index | even | odd |
equation )
FUNCTION
RETURNS
previous + next
SELECTOR
RETURNS
size()
Number
previous ~ siblings
Array<Element>
eq( index )
get()
get( index )
index( element )
jQuery
Array<Element>
Basic Filters
:first-child
Array<Element>
Array<Element>
SELECTOR
RETURNS
:last-child
Element
:first
Array<Element>
Array<Element>
Array<Element>
Array<Element>
:only-child
Array<Element>
Number
jQuery
:last
each( func )
:not( selector )
Forms
SELECTOR
RETURNS
1) New in jQuery 1.3
:even
:hidden
Array<Element>
Array<Element>
Array<Element>
Data
:odd
:input
FUNCTION
RETURNS
Array<Element>
data( name )
data( name , value )
removeData( name )
queue( name )
queue( name , func )
queue( name , queue )
dequeue( name )
Object
:eq( index )
Array<Element>
:text
jQuery
jQuery
:gt( index )
Array<Element>
:password
Array<Element>
:lt( index )
Array<Element>
:checkbox
Array<Element>
Array<Element>
Array<Element>
Array<Function>
:header
Array<Element>
:radio
jQuery
jQuery
jQuery
:animated
Array<Element>
:image
Content Filters
:file
Array<Element>
SELECTOR
RETURNS
:button
Array<Element>
Array<Element>
:contains( text )
Array<Element>
Array<Element>
Array<Element>
:submit
Plugins
$.fn.extend( object )
$.extend( object )
:empty
FUNCTION
RETURNS
:reset
Array<Element>
jQuery
jQuery
:has( selector )
Form Filters
:parent
Array<Element>
SELECTOR
RETURNS
Interoperability
$.noConflict()
$.noConflict( extreme )
Visibility Filters
:enabled
Array<Element>
Array<Element>
Array<Element>
FUNCTION
RETURNS
:disabled
SELECTOR
RETURNS
jQuery
jQuery
:hidden
Array<Element>
Array<Element>
:checked
:visible
:selected
Array<Element>
Attributes
Manipulation
Traversing
Attr
Insert Inside
append( content )
Filtering
FUNCTION
RETURNS
FUNCTION
RETURNS
FUNCTION
RETURNS
attr( name )
Object
jQuery
jQuery
jQuery
filter( expr )
jQuery
jQuery
attr( props )
appendTo( selector )
filter( func )
attr( key , value | func )
jQuery
prepend( content )
jQuery
jQuery
is( expr )
Boolean
removeAttr( name )
jQuery
prependTo( selector )
map( func )
jQuery
Class
hasClass( class )
Insert Outside
after( content )
not( expr )
jQuery
FUNCTION
RETURNS
FUNCTION
RETURNS
slice( start , [ end ] )
jQuery
Boolean
jQuery
jQuery
jQuery
jQuery
addClass( class )
before( content )
Finding
FUNCTION
RETURNS
removeClass( [ class ] )
insertAfter( content )
jQuery
jQuery
add( expr )
jQuery
jQuery
toggleClass( class )
jQuery
jQuery
insertBefore( content )
children( [ expr ] )
toggleClass( class , switch )
Insert Around
closest( [ expr ] )
jQuery
FUNCTION
RETURNS
contents()
jQuery
HTML
wrap( html | element )
jQuery
FUNCTION
RETURNS
find( expr )
jQuery
html()
String
jQuery
wrapAll( html | element )
jQuery
jQuery
next( [ expr ] )
jQuery
html( value )
wrapInner( html | elem )
nextAll( [ expr ] )
jQuery
Text
Replace
prev( [ expr ] )
jQuery
FUNCTION
RETURNS
FUNCTION
RETURNS
text()
String
jQuery
replaceWith( content )
jQuery
prevAll( [ expr ] )
jQuery
text( value )
replaceAll( selector )
jQuery
offsetParent()
jQuery
parent( [ expr ] )
jQuery
Value
Remove
parents( [ expr ] )
jQuery
FUNCTION
RETURNS
FUNCTION
RETURNS
val()
String, Array
empty()
jQuery
siblings( [ expr ] )
jQuery
val( value )
jQuery
remove( [ expr ] )
jQuery
Chaining
Copy
FUNCTION
RETURNS
andSelf()
FUNCTION
RETURNS
jQuery
jQuery
clone( [ events ] )
jQuery
end()
Legend
SYNTAX
DESCRIPTION
SYNTAX
DESCRIPTION
SYNTAX
DESCRIPTION
SYNTAX
DESCRIPTION
function
functions or properties
argument
arguments
|
one argument only
[ ]
optional argument
432419169.003.png 432419169.004.png 432419169.005.png 432419169.006.png
 
jQuery 1.3 Cheat Sheet
Events
CSS
Utilities
Page Load
ready( func )
CSS
Browser & Feature Detection
FUNCTION
RETURNS
FUNCTION
RETURNS
PROPERTY
RETURNS
jQuery
css( name )
String
jQuery
$.browser 5
Map
String
Boolean
Boolean
Event Handling
css( props )
$.browser.version 5
FUNCTION
RETURNS
css( name , value )
jQuery
$.boxModel 5
$.support.boxModel 6
bind( type , [ data ] , func )
jQuery
Position
one( type , [ data ] , func )
jQuery
FUNCTION
RETURNS
$.support.cssFloat 6
Boolean
trigger( event , [ data ] )
jQuery
offset()
Object {top, left}
Object {top, left}
$.support.hrefNormalized 6
Boolean
triggerHandler( event , [ data ] )
Object
position()
$.support.htmlSerialize 6
Boolean
unbind( [ type ] , [ data ] )
jQuery
scrollTop()
Integer
$.support.leadingWhitespace 6
Boolean
scrollTop( value )
jQuery
Live Events
$.support.noCloneEvent 6
Boolean
FUNCTION
RETURNS
scrollLeft()
Integer
$.support.objectAll 6
Boolean
live( type , func ) 3
jQuery
scrollLeft( value )
jQuery
die( [ type ] , [ func ] ) 3
jQuery
$.support.opacity 6
Boolean
Dimension
$.support.scriptEval 6
Boolean
Interaction Helpers
FUNCTION
RETURNS
$.support.style 6
FUNCTION
RETURNS
width()
Integer
Boolean
hover( over , out )
jQuery
width( value )
jQuery
$.support.tbody 6
Boolean
toggle( func1 , func2 , ..., [ funcN ] )
jQuery
height()
Integer
5) Deprecated in jQuery 1.3
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 ,
..., [ objectN ] )
Object
click( [ func ] ) 4
jQuery
outerWidth( [ options ] )
Integer
dblclick( [ func ] ) 4
jQuery
outerHeight( [ options ] )
Integer
$.grep( array , func , [ invert ] )
Array
$.makeArray( object )
Array
error( [ func ] ) 4
jQuery
focus( [ func ] ) 4
jQuery
Effects
$.map( array , func )
Array
Basic
$.inArray( value , array )
Number
keydown( [ func ] ) 4
jQuery
FUNCTION
RETURNS
keypress( [ func ] ) 4
jQuery
show()
jQuery
jQuery
jQuery
jQuery
$.merge( first , second )
Array
keyup( [ func ] ) 4
jQuery
show( speed , [ func ] )
$.unique( array )
Array
load( func )
jQuery
hide()
hide( speed , [ func ] )
Test Operations
FUNCTION
RETURNS
mousedown( func )
jQuery
$.isArray( object )
Boolean
mousemove( func )
jQuery
toggle()
jQuery
$.isFunction( object )
Boolean
mouseout( func )
jQuery
toggle( switch )
jQuery
String Operations
toggle( speed , [ func ] )
jQuery
mouseover( func )
jQuery
FUNCTION
RETURNS
mouseup( func )
jQuery
Sliding
$.trim( string )
String
resize( func )
jQuery
FUNCTION
RETURNS
URLs
slideDown( speed , [ func ] )
jQuery
jQuery
scroll( func )
jQuery
FUNCTION
RETURNS
slideUp( speed , [ func ] )
$.param( object )
String
select( [ func ] ) 4
jQuery
slideToggle( speed , [ func ] )
jQuery
submit( [ func ] ) 4
jQuery
Ajax
Fading
unload( func )
jQuery
Requests
FUNCTION
RETURNS
3) New in jQuery 1.3
4) Omitting the value triggers the events on each matched element
fadeIn( speed , [ func ] )
jQuery
jQuery
FUNCTION
RETURNS
$.ajax( options )
XMLHttpRequest
jQuery
XMLHttpRequest
Event Object
fadeOut( speed , [ func ] )
load( url , [ data ] , [ func ] )
PROPERTY
RETURNS
fadeTo( speed , opacity , [ func ] )
jQuery
type
String
Element
Element
Element
$.get( url , [ data ] , [ func ] , [ type ] )
target
Custom
$.post( url , [ data ] , [ func ] , [ type ] )
XMLHttpRequest
FUNCTION
RETURNS
relatedTarget
currentTarget
animate( params , [ duration ] ,
[ easing ] , [ func ] )
$.getJSON( url , [ data ] , [ func ] )
XMLHttpRequest
jQuery
$.getScript( url , [ func ] )
XMLHttpRequest
pageX
String
animate( params , options )
jQuery
Events
stop( [ clearQueue ] , [ gotoEnd ] )
pageY
String
jQuery
FUNCTION
RETURNS
ajaxComplete( [ func ] )
jQuery
result
Object
Settings
ajaxSuccess( [ func ] )
jQuery
timeStamp
Number
PROPERTY
RETURNS
$.fx.off
Boolean
ajaxError( [ func ] )
FUNCTION
RETURNS
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<Object>
Legend
SYNTAX
DESCRIPTION
SYNTAX
DESCRIPTION
SYNTAX
DESCRIPTION
SYNTAX
DESCRIPTION
function
functions or properties
argument
arguments
|
one argument only
[ ]
optional argument
432419169.001.png 432419169.002.png
Zgłoś jeśli naruszono regulamin