From jQuery JavaScript Library
« Back to Events
blur( )
Triggers the blur event of each matched element.
This causes all of the functions that have been bound to that blur event to be executed, and calls the browser's default blur action on the matching element(s). This default action can be prevented by returning false from one of the functions bound to the blur event. The blur event usually fires when an element loses focus either via the pointing device or by tabbing navigation
Examples:| Name | Type |
To triggers the blur event on all paragraphs:
$("p").blur();
blur( fn )
Bind a function to the blur event of each matched element.
The blur event fires when an element loses focus either via the pointing device or by tabbing navigation.
Arguments:| fn | Function | |
|---|
A function to bind to the blur event on each of the matched elements.
function callback(eventObject) {
this; // dom element
}
|
Examples:| Name | Type |
To pop up an alert saying "Hello World!" every time any paragraph's blur event triggers:
$("p").blur( function () { alert("Hello World!"); } );