Contents:
.on( "blur" [, eventData ], handler )Returns: jQuery
Description: Bind an event handler to the "blur" event.
-
version added: 1.7.on( "blur" [, eventData ], handler )
blur
event. For the deprecated .blur()
method, see .blur()
.
blur
event is sent to an element when it loses focus. Originally, this event was only applicable to form elements, such as <input>
. In recent browsers, the domain of the event has been extended to include all element types. An element can lose focus via keyboard commands, such as the Tab key, or by mouse clicks elsewhere on the page.
1
2
3
4
5
6
7
|
|
1
2
3
|
|
.trigger( "blur" )
:
1
2
3
|
|
blur
event does not bubble. As of version 1.4.2, jQuery works around this limitation by mapping blur
to the focusout
event in its event delegation methods.
blur
event is asynchronous in all versions of IE, contrary to other browsers. To avoid issues related to this discrepancy, as of jQuery 3.7.0, jQuery uses focusout
as the native backing event for blur
in IE.
Example:
1
|
|
.trigger( "blur" )Returns: jQuery
Description: Trigger the "blur" event on an element.
-
version added: 1.0.trigger( "blur" )
-
"blur"Type: stringThe string
"blur"
.
-
.on( "blur", ... )
.