plainJS

Functions / Events

Events

Binding and unbinding events. 7 snippets.

  1. Binding and unbinding of event handlers$.on(), $.bind(), $.live(), $.click(), $.focus(), $.submit(), etc.
  2. Getting the current mouse position$.mousedown(), $.click(), $.mouse...
  3. Getting the keycode from keyboard events$.keypress(), $.keyup(), $.keydown()
  4. Live binding event handlers$.live(), $.on(), $.bind()
  5. Preventing the default action or bubbling of eventse.preventDefault(), e.stopPropagation()
  6. Running code when the document is ready$(document).ready()
  7. Trigger an event$.trigger(), $.click(), $.focus(), $.submit(), etc.

The other groups: