jQuery Events

Handling events.

jQuery Events

All the different visitors' actions that a web page can respond to are called events.

An event represents the precise moment when something happens.

Examples:

  • moving a mouse over an element
  • selecting a radio button
  • clicking on an element

The term "fires/fired" is often used with events. Example: "The keypress event is fired, when you press a key".

Example

$("p").click(function(){
  // action goes here!!
});