Event handling is one of the core functions in jQuery. Event handlers are methods that are called when an action occurs in HTML. These actions are also referred to as event triggers.
When these events are triggered you can then use a function to perform some action with regard to the event. There are several events that we have access to in jQuery. Here are some generic examples of actions that can trigger an event:
- Clicking the mouse
- Hovering over an element
- Loading a page
- Submitting a form
- A keystroke
Let us take a look at a common example, where you may want to hide an element when the click event occurs.
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $("#close").click(function () {
            $("#div1").slideUp(200);
        });
    });
</script>In the previous above, a function is called when the click event for the div with an id of div1 is triggered: $("#div1").click(function() {..other code...} ). Here are some other jQuery events that you would commonly use in your web pages.
| Event | Description | 
|---|---|
| bind() | Add an event handler of selected elements. | 
| blur() | Binds an event handler to the blurevent of selected elements. | 
| change() | Binds an event handler to the changeevent of selected elements. | 
| click() | Binds an event handler to the clickevent of selected elements. | 
| dblclick() | Binds an event handler to the dblclickevent of selected elements. | 
| delegate() | Attach handlers to current and/or future, specified child elements of the matching elements. | 
| die() | Remove all event handlers previously attached with the live()function. | 
| error() | Binds an event handler to the errorevent of selected elements. | 
| event.currentTarget | The current DOM element within the event bubbling phase. | 
| event.data | Optional data map passed to an event when the current executing handler is bound. | 
| event.delegateTarget | The element where the called event handler was attached. | 
| event.isDefaultPrevented() | Returns whether event.preventDefault()was called for the event object. | 
| event.isImmediatePropagationStopped() | Returns whether event.stopImmediatePropagation()was called for the event object. | 
| event.isPropagationStopped() | Returns whether event.stopPropagation()was called for the event object. | 
| event.namespace | The name specified when the event was triggered. | 
| 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.relatedTarget | The other DOM element involved in the event, if any. | 
| event.result | The last value returned by an event handler that was triggered by this event. | 
| event.stopImmediatePropagation() | Prevents other event handlers from being called. | 
| event.stopPropagation() | Prevents the event from bubbling up the DOM tree. | 
| event.target | The DOM element that initiated the event. | 
| event.timeStamp | The difference in milliseconds between January 1, 1970 and when the event is triggered. | 
| event.type | Describes the nature of the event. | 
| event.which | Which key or mouse button was pressed for an event. | 
| focus() | Binds an event handler to the focusevent. | 
| focusin() | Binds an event handler to the focusinevent. | 
| focusout() | Binds an event handler to the focusoutevent. | 
| hover() | Binds two handlers to the hoverevent of selected elements. | 
| keydown() | Binds an event handler to the keydownevent of selected elements. | 
| keypress() | Binds an event handler to the keypressevent of selected elements. | 
| keyup() | Binds an event handler to the keyupevent of selected elements. | 
| live() | Attach an event handler for all elements which match the current selector, now or future. | 
| load() | Binds an event handler to the loadevent of selected elements. | 
| mousedown() | Binds an event handler to the mousedownevent of selected elements. | 
| mouseenter() | Binds an event handler to the mouseenterevent of selected elements. | 
| mouseleave() | Binds an event handler to the mouseleaveevent of selected elements. | 
| mousemove() | Binds an event handler to the mousemoveevent of selected elements. | 
| mouseout() | Binds an event handler to the mouseoutevent of selected elements. | 
| mouseover() | Binds an event handler to the mouseoverevent of selected elements. | 
| mouseup() | Binds an event handler to the mouseupevent of selected elements. | 
| off() | Remove an event handler. | 
| on() | Attach an event handler function for one or more events to the selected elements. | 
| one() | Attach a handler to an event. This handler is triggered (at most) once per element. | 
| ready() | Specify a function to execute when the DOM is fully loaded. | 
| resize() | Binds an event handler to the resizeevent of selected elements. | 
| scroll() | Binds an event handler to the scrollevent of selected elements. | 
| select() | Binds an event handler to the selectevent of selected elements. | 
| submit() | Binds an event handler to the submitevent of selected elements. | 
| toggle() | Binds an event handler to the togglebetween the click event for selected elements. | 
| trigger() | Execute all handlers bound to the selected elements. | 
| triggerHandler() | Execute all handlers attached to an element for an event. | 
| unbind() | Remove event handler from selected elements. | 
| undelegate() | Remove an event handler to selected elements, now or in the future. | 
| unload() | Binds an event handler to the unload event of selected elements. | 













