The blur event fires when an element loses focus — Tab away, click elsewhere, or call .trigger("blur"). Bind with .on("blur", handler) (since jQuery 1.7). Originally for form fields; modern browsers also send it on other focusable elements.
Syntax
Start with these common calls. Keep them short and readable.
jQuery
$("#email").on("blur", function () {
// user left this field
});
$("#email").trigger("blur"); // fire in code
// Opposite: focus = gains focus
// Bubbling sibling: focusout (use for delegation)
// Legacy shorthand: .blur() — prefer .on / .trigger
Call
What it does
Blur
Learn the jQuery blur event: bind with .on('blur'), trigger with .trigger('blur'), compare blur vs focus and focusout, validate on field exit, and avoid the deprecated .blur() shorthand.
Load jQuery before your script (CDN or local file), then wrap DOM work in $(function () { ... }) when needed.
Parameters
Parameter
Description
Step 1
Select the element ($("#email"), $("input.name"), …).
Step 2
Call .on("blur", handler) — optional eventData before the handler.
Step 3
In the handler, read this / $(this) for the field that lost focus.
Return Value
Return Value
Description
jQuery object
Most setters and traversing helpers return the jQuery collection so you can chain more methods.
jQuery Examples
Example 1 — Bind a Blur Handler
Log a message when the field loses focus (official idea).
jQuery
$("#target").on("blur", function () {
$("#out").text("Handler for blur called.");
});
Wait. Validation runs after the user leaves the field.
Read.$(this).val() is the current text.
Check. Empty (after trim) → show an error message.
Frequently Asked Questions
The blur event fires when an element loses focus — the user tabs away, clicks elsewhere, or you call .trigger("blur"). Bind handlers with .on("blur", handler) (since 1.7). It applies to form controls and other focusable elements.
They are opposites. focus fires when an element gains focus; blur fires when it loses focus. Pair them for UX: show a hint on focus, validate or hide it on blur.
No. Native blur does not bubble. For one handler on a parent form (including dynamic fields), use focusout — it bubbles. Since 1.4.2, jQuery maps blur to focusout in its delegation methods.
Call $('#target').trigger("blur"). That runs bound blur handlers and moves focus away per browser rules. Useful when a button should force a field’s blur validation before submit.
Both. Blur gives feedback right after the user leaves a field. Submit catches anything missed. Common pattern: light checks on blur, full form check on submit.
blur is the event name used with .on("blur") / .trigger("blur"). .blur() is the deprecated shorthand method — prefer .on("blur") and .trigger("blur") in new code (deprecated since jQuery 3.3).