Kategorien: Alle - event

von vacuus jp Vor 12 Jahren

2677

jQuery

jQuery

jQuery

event

mouse
keyboard
Subtopic
keyup
keydown
document loading
ready
unload

load([eventData], handler(eventObject))

load(handler(eventObject))

shortcut for: bind('load', eventHandler)

browser
scroll
resize

resize()

shortcut for: trigger('resize')

resize([eventData], handler(eventObject))

resize(eventObject)

shortcut for: bind('resize', handler)

error

error([eventData], handler(eventObject))

error(handler(eventObject))

shortcut for: bind('error',handler)

form

CSS

scrollTop
scrollLeft
scrollLeft(value)
scrollLeft()
offset
offset(function(index, coordinates))
offset(coordinates)
offset()
position
position()

Note: returns an object containing two properties top and left

outerWidth
outerHeight
outerHeight([include margin])

Note: contains an element and its padding and border and also contains its margin if passed true

innerWidth
innerHeight
innerHeight()

Note: contains a element and its padding

width
height
height(function(index, value))
height(value)
height()
css
css(map)
css(propName, function(index, value))
css(propName, value)
css(propName)

attributes

val
value(function(index, old value))
val(value)
val()
html
html(function(index, old html string))
html(html string)
html()
property
removeProp
prop
removeAttr
attr

attr(attrName, function(index, attr))

attr(map)

attr(attrName, value)

attr(attrName)

class
toggleClass

toggleClass(function(index, class,switch) [, switch])

toggleClass(switch)

toggleClass(className, switch)

toggleClass(className)

removeClass
hasClass
addClass

addClass(funnction(index, currentClass))

addClass(className)

Note: classname contains one ore more class names separated by blank

selector

other

:header

:focus

:animated

visibility

:hidden

:visible

child

:nth-child

Note: 1-Indexed(from CSS3 Specification) Usage: :nth-child(3) :nth-child(3n+1) :nth-child(odd)

:only-child

:last-child

:first-child

:eq

:lt

:gt

:even

:odd

:last

:first

content

:parent

:empty

:contains(text)

attribute

[attrFilter1][attrFilter2]...[attrFilterN]

[attr$="value"]

[attr^="value"]

[attr|="value"]

[attr~="value"]

[attr*="value"]

[attr!="value"]

[attr="value"]

[attr]

hierarchy
prev ~ siblings
prev + next
parent > child
ancestor descendant
basic
selector1, selector2,..., selectorN
tagname
#id
.class
*

core

$(plain or jQuery Object)
$(html, props)
$(html [, ownerDocument])
$(element, or elementArray)
$(selector [, context])

Data Storage

removeData
removeData([list])
removeData([name])
data
data(obj)
data(key,value)
data(key)
data()

helper

selializeArray
serialize
$.param

Ajax

load
(url [,data] [,complete(responseText, textStatus, XMLHttpRequest)])
$.getScript
$.getScript(url, [,success(data, textStatus)])
$.getJSON
$.getJSON(url [,data] [,success(data, textStatus, jqXHR)])
$.post
$.post(url [,data][,success(data, textStatus, jqXHR)[,dataType])
$.get
$.get(url [,data][,success(data, textStatus, jqXHR)[,dataType])
Global Ajax Event Handlers
ajaxStop

ajaxStop(handler)

ajaxComplete

ajaxComplete(handler(data,xhr,ajaxOptions))

ajaxError

ajaxError(handler(event, jqXHR, ajaxSettings, thrownError))

ajaxSuccess

ajaxSuccess(handler(data,xhr,ajaxOptions))

ajaxSend

ajaxSend(handler(data,jqXHR, ajaxOptions))

ajaxStart

ajaxStart(handler)

DOM Manupilation

removal
unwrap

unwrap()

empty

empty()

remove

remove([selector])

detach

detach([selector])

copying
clone

clone( [withDataAndEvents] [, deepWithDataAndEvents] )

replacement
replaceAll

replaceAll(selector)

replaceWith

replaceWith(function(index))

replaceWith(new Content)

insertion
arround

wrapInner

wrapInner(function(index))

wrapInner(wrapping Element)

wrapAll

wrapAll(wrapping Element)

wrap

wrap(function(index))

wrap(wrapping Element)

inside

text

text(function(i, string))

text(TextString)

text()

prependTo

prepend

appendTo

appendTo(target)

target: selector, DOMElement, jQueryObject, HTMLString

append

append(function(index, html))

append(content [, content])

content: HTMLString, DOMElement, jQueryObject

outside

insertBefore

before

insertAfter

insertAfter(selector/DOMElement/jQueryObject/HTMLString)

after

after(HTMLString/DOMElement/jQueryObject [, content(one or more additional contents to be inserted; jQueryObjects, HTMLStrings,array of DOMElements)])

manipulation

tree
has

has(selector / DOM Element)

find

find(selector/element/jQueryObject)

closest

closest([element/jQueryObject])

closest([selector/array of selectors] [, context])

siblings

siblings([selector])

children

children([selector])

next

nextUntil

nextUntil([selector / element/jQueryObject])

nextAll

nextAll([selector])

next([selector])

prev

prevUntil

prevUntil([selector / element/jQueryObject], [filter])

prevAll

prevAll([selector])

prev([selector])

parent

offsetParent

offsetParent()

parentsUntil

parentsUntil([selector / element/jQueryObject],[filter])

parents

parents([selector])

parent([selector])

choice
slice

slice(start [, end])

last

last()

first

first()

eq

eq(index)

not

not(elements)

not(function(index))

not(selector)

filter

filter(jQuery Object)

filter(element)

filter(function(index))

filter(selector)

check
is(jQuery Object)
is(function(index))
is(selector)
collection
each

each(function(index, element))

map

map(function(index, domElement))

contents
contents()
end
end()
andSelf
andSelf()
add
add(selector / html / elements / jQuery Object [, context])