jQuery's methods for event

METHODDESCRIPTION
.bind()Binds an event handler
.delegate()Binds a handler to one or more events currently or in the future
.die()Removes event handlers add using the .live() method
.live()Binds a handler currently or in the future
.one()Attaches an event handler that is executed at most once
.proxy()Takes a function and returns another belonging to a specifi ed context
.trigger()Executes event handlers attached to an element for an event type
.triggerHandler()Executes all handlers for a specifi c event
.unbind()Removes event bindings created with .bind()
.undelegate()Removes bindings created with .delegate()

jQuery event handlers.

  • .blur()
  • .focus()
  • .select()
  • .submit()
  • .click()
  • .dblclick()
  • .focusin()
  • .focusout()
  • .hover()
  • .mousedown()
  • .mouseenter()
  • .mousemove()
  • .mouseout()
  • .mouseover()
  • .mouseup()
  • .toggle()
  • .error()
  • .resize()
  • .scroll()

The Event object passed into the handlers is normalized and is of the type jQuery.Event.

It contains the properties outlined in the follong list:

PropertyDescription
altKeytrue if the Alt key was pressed.
attrChange
attrName
Bubbles
Button
Cancelable
charCode
Client
Client
ctrlKeytrue if the Ctrl key was pressed.
currentTarget
datapassed as the second parameter to the bind() command.
detail
eventPhase
fromElement
handler
keyCodeFor keyup and keydown events, returns the pressed key.
layerX
layerY
metaKeytrue if the Meta key was pressed.
newValue
Offset
originalTarget
pageXFor mouse events, horizontal coordinate.
pageYFor mouse events, vertical coordinate.
prevValue
relatedNode
relatedTargetFor some mouse events, cursor left or entered when the event was triggered.
Screen
screenXFor mouse events, horizontal coordinate.
screenYFor mouse events, coordinate from the screen origin.
shiftKeySet to true if the Shift key was pressed.
srcElement
target
toElement
View
wheelDelta
which
Home 
  JavaScript Book 
    jQuery  

Event:
  1. jQuery Event
  2. jQuery's methods for event
  3. Event object
  4. event.keycode
  5. event.clientX/clientY
  6. event.pageX/pageY: click event coordinates
  7. event.preventDefault()
  8. event.stopPropagation(): Stop only an event from bubbling by using the stopPropagation method.
  9. event.target.tagName
  10. event.which:check key code
  11. return false to Cancel a default action and prevent it from bubbling up
  12. bind
  13. .blur()
  14. .change()
  15. .click()
  16. .error()
  17. .dblclick()
  18. .delegate()
  19. die:Removes a bound live event
  20. .focus()
  21. .hover()
  22. keydown() event
  23. .keypress()
  24. keyup event and check the key code
  25. .live()
  26. .load()
  27. mousedown() event
  28. mouseenter() event
  29. mouseleave
  30. mousemove()
  31. mouseover() event
  32. mouseout
  33. mouseup() event
  34. .off() removes events
  35. .on() replaces the functionality of all the event methods.
  36. .one() method executes handler only once.
  37. .ready()
  38. .resize()
  39. .scroll()
  40. .select()
  41. .submit()
  42. .toggle()
  43. .trigger()
  44. .triggerHandler()
  45. .unbind() accepts a string describing the event type to unbind.
  46. .undelegate() removes the binding
  47. .unload()
  48. use bind/trigger to create custom event