.blur() is jQuery’s legacy shorthand for binding or triggering the blur event — when an element loses focus. Binding is deprecated since 3.3; modern code uses .on("blur") / .trigger("blur").
Syntax
Start with these common calls. Keep them short and readable.
jQuery
// Legacy (still works; bind form deprecated since 3.3)
$("#email").blur(function () {
// field lost focus
});
// Modern replacements
$("#email").on("blur", handler); // bind
$("#email").trigger("blur"); // fire
// No-arg .blur() = trigger (prefer .trigger("blur"))
$("#email").blur();
Call
What it does
handler
function(event) — runs when focus leaves
eventData
Extra data available as event.data
No-arg call
Fires blur on each matched element
Target elements
Focusable controls (inputs, etc.)
Load jQuery before your script (CDN or local file), then wrap DOM work in $(function () { ... }) when needed.
Parameters
Parameter
Description
Step 1
Bind with .blur(handler) (legacy) or .on("blur", handler) (preferred).
Data. The object becomes event.data inside the handler.
Blur. Leaving the field runs the callback.
Read. Use event.data.field and $(this).val().
Frequently Asked Questions
The .blur() method has two roles. With a handler — .blur(handler) or .blur(eventData, handler) — it binds a function that runs when the element loses focus. With no arguments — .blur() — it triggers the blur event on each matched element. Binding has been part of jQuery since 1.0 and is deprecated since 3.3.
Yes. The binding signatures .blur(handler) and .blur(eventData, handler) are deprecated since jQuery 3.3. Use .on("blur", handler) instead. The no-argument .blur() trigger still works, but .trigger("blur") is clearer. Legacy code continues to run in jQuery 3.x.
.blur(handler) registers a callback and does not fire immediately. .blur() with no arguments triggers the blur event — the same as .trigger("blur"). Check whether parentheses contain a function before reading legacy code.
Replace .blur(fn) with .on("blur", fn). Replace .blur(data, fn) with .on("blur", data, fn). Replace no-arg .blur() with .trigger("blur"). Cleanup with .off("blur"). Under the hood, .blur(handler) already delegates to .on("blur").
No. Native blur does not bubble. A parent .blur(fn) will not see child fields lose focus. Use focusout (or .on("focusout")) on the form for parent-level handlers. Since 1.4.2, jQuery maps blur to focusout in its delegation methods.
No. Direct .blur(fn) only binds to elements that already match. For dynamic fields, use .on("focusout", "input", fn) on a parent — another reason to prefer .on() over the shorthand.