Manual de referência jQuery - Eventos

jQuery event methods

Event methods will trigger the event of the matching element, or bind a function to the event of some element matching all.

Trigger instance:

$("button#demo").click()

The example above will trigger the click event of the button element with id="demo".

Binding instance:

$("button#demo").click(function(){$("img").hide()})

The example above will hide all images when the button with id="demo" is clicked.

Method Description
bind() Attach one or more event handlers to the matching element
blur() Trigger or bind a function to the blur event of the specified element
change() Trigger or bind a function to the change event of the specified element
click() Trigger or bind a function to the click event of the specified element
dblclick() Trigger or bind a function to the double click event of the specified element
delegate() Attach one or more event handlers to the current or future child elements of the matching elements
die() Removes all event handlers added through the live() function.
error() Trigger or bind a function to the error event of the specified element
event.isDefaultPrevented() Returns whether event.preventDefault() was called on the event object.
event.pageX The mouse position relative to the left edge of the document.
event.pageY The mouse position relative to the top edge of the document.
event.preventDefault() Prevents the default action of the event.
event.result Contains the last value returned by the event handler triggered by the specified event.
event.target The DOM element that triggered the event.
event.timeStamp This property returns the number of milliseconds from January 1, 1970, to the time the event occurred.
event.type Describes the type of the event.
event.which Indicates which key or button was pressed.
focus() Trigger or bind a function to the focus event of the specified element
keydown() Trigger or bind a function to the key down event of the specified element
keypress() Trigger or bind a function to the key press event of the specified element
keyup() Disparar, ou ligar uma função ao evento key up de um elemento especificado
live() Adicionar um ou mais manipuladores de eventos para elementos correspondentes ou futuros
load() Disparar, ou ligar uma função ao evento load de um elemento especificado
mousedown() Disparar, ou ligar uma função ao evento mouse down de um elemento especificado
mouseenter() Disparar, ou ligar uma função ao evento mouse enter de um elemento especificado
mouseleave() Disparar, ou ligar uma função ao evento mouse leave de um elemento especificado
mousemove() Disparar, ou ligar uma função ao evento mouse move de um elemento especificado
mouseout() Disparar, ou ligar uma função ao evento mouse out de um elemento especificado
mouseover() Disparar, ou ligar uma função ao evento mouse over de um elemento especificado
mouseup() Disparar, ou ligar uma função ao evento mouse up de um elemento especificado
one() Adicionar um manipulador de eventos para elementos correspondentes. Cada elemento pode disparar esse manipulador apenas uma vez.
ready() Evento de documento pronto (quando o documento HTML estiver pronto e disponível)
resize() Disparar, ou ligar uma função ao evento resize de um elemento especificado
scroll() Disparar, ou ligar uma função ao evento scroll de um elemento especificado
select() Disparar, ou ligar uma função ao evento select de um elemento especificado
submit() Disparar, ou ligar uma função ao evento submit de um elemento especificado
toggle() Ligar dois ou mais funções de manipulador de eventos, que serão executadas quando ocorrerem eventos de clique consecutivos.
trigger() O evento especificado em todos os elementos correspondentes
triggerHandler() O primeiro elemento correspondente ao evento especificado
unbind() Remover um manipulador de eventos adicionado de elementos correspondentes
undelegate() Remover um manipulador de eventos adicionado de elementos correspondentes, agora ou no futuro
unload() Disparar, ou ligar uma função ao evento unload de um elemento especificado

Ver

Tutorial:Sintaxe do seletor de elementos do jQuery