The focusout event fires when an element or any element inside it loses focus. Unlike blur, focusoutbubbles — so one handler on a parent form can validate every nested input when the user leaves it.
Remember
// Parent form — one handler for all inputs
$("#form").on("focusout", "input", function () {
// a nested input lost focus
});
// blur does NOT bubble; focusout does
$("#wrapper").on("blur", fn); // misses child blur
$("#wrapper").on("focusout", fn); // runs for child blur
// Pair with focusin for enter/exit
$("#form").on("focusin", "input", enterFn);
Inside the handler, use event.target or $(this) (delegated) for the field that lost focus.
Pair with focusin when you need enter and exit on the same parent.
To move keyboard focus away, call .trigger("blur") on the input — not only focusout.
Piece
Required?
Role
Parent element
Yes
Container that listens (form, div, paragraph)
Selector filter
Optional
"input", "textarea", etc. for delegation
handler
For bind
function(event) — runs on loss of focus
eventData
Optional
Extra data available as event.data
Pseudocode
Pseudocode
call parent.on("focusout", "input", handler)
→ store delegated handler on parent
when user leaves a nested input:
fire "blur" on the input (does not bubble)
fire "focusout" on the input
focusout bubbles → reaches parent
if target matches "input":
call handler(event)
this → the input (delegated)
call parent.on("blur", handler)
→ never runs for nested input blur
(blur does not bubble)
to migrate shorthand:
.focusout(fn) → .on("focusout", fn)
.focusout() → .trigger("focusout")
Reference
Cheat Sheet
Keep these facts handy when wiring leave-focus UX on forms.
Topic
Detail
Bind
$("#form").on("focusout", "input", handler)
Trigger
$("#el").trigger("focusout")
Unbind
$("#form").off("focusout" [, handler])
Bubbles?
Yes — unlike blur
vs blur
Same idea; focusout bubbles to parents
vs focusin
Lose vs gain; both bubble
Since
.on("focusout") 1.7 · .trigger("focusout") 1.0
Legacy shorthand
.focusout() ⚠ deprecated for binding since 3.3
Delegated blur
.on("blur", "input", fn) uses focusout under the hood
Try it
Live Preview
Tab out of nested fields. The form listens with .on("focusout", "input", …) — one handler covers every input.
You can also tab between the demo fields below.
Result
Ready — leave a field or pick an action.
Code
jQuery Examples
Short, copy-ready snippets based on the official jQuery API idea — listen on a parent when nested controls lose focus.
Example 1 — focusout vs blur on a Parent
Official idea: count both events on a paragraph — only focusout increments for nested leave.
Leave nested input → focusout count rises
blur count on <p> stays 0 (does not bubble)
How It Works
Bind both. The paragraph listens for focusout and blur.
Leave. Tabbing out of a nested input fires both events on the input.
Bubble. Only focusout reaches the paragraph.
Count. The focusout counter increases; blur on <p> does not.
Example 2 — Delegated Validation on Leave
One handler on the form checks required fields when the user exits them.
jQuery
$("#signup-form").on("focusout", "input", function () {
var name = $(this).attr("name") || "(unnamed)";
var empty = $(this).val().trim().length === 0;
$("#out").text(
empty ? name + " is empty — please fill it in." : name + " looks OK."
);
});
Leave empty email → "email is empty — please fill it in."
Leave filled name → "first looks OK."
How It Works
Parent. The handler lives on #signup-form.
Leave. Exiting any matching input fires focusout.
Check. Read $(this).val() for a simple empty test.
Message. Status text guides the user to fix the field.
Example 3 — blur vs focusout on a Wrapper
Prove that parent blur stays silent while focusout runs.
jQuery
var log = [];
$("#wrapper").on("blur", function () {
log.push("blur on wrapper (will NOT run)");
});
$("#wrapper").on("focusout", function () {
log.push("focusout on wrapper (runs)");
$("#out").text(log.join(" | "));
});
Tab into first → "Entered: first"
Tab to last → "Left: first" then "Entered: last"
How It Works
Enter.focusin updates the status when a field is entered.
Leave.focusout updates it when the field is left.
Same parent. Both handlers live on the form.
UX. Ideal for hints on enter and validation on leave.
Edge Cases & Pitfalls
Check these before relying on parent-level leave-focus handlers.
blur
Parent blur will miss children
blur does not bubble. Use focusout (or delegated .on("blur", "input", fn)).
trigger
.trigger("focusout") ≠ move focus
It runs handlers. To move the caret away, call .trigger("blur") on the input or focus another field.
pair
Pair with focusin
Show hints on focusin and validate on focusout so helpers and errors stay in sync.
shorthand
.focusout(handler) is deprecated
Prefer .on("focusout", handler). The shorthand bind form is deprecated since jQuery 3.3.
Compatibility
Browser Support
The focusout event is a standard DOM event with bubbling. Bind with .on("focusout") since jQuery 1.7; .trigger("focusout") has existed since 1.0. jQuery has long used focusout for delegated blur (since 1.4.2).
✓ jQuery 1.7+
jQuery focusout event
Supported in all browsers jQuery targets. Prefer .on('focusout') for parent forms. Pair with focusin. Native equivalent: element.addEventListener('focusout', fn).
100%With jQuery loaded
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
focusoutExcellent
Bottom line: Safe for modern and legacy jQuery projects. Use focusout whenever a parent must react to nested leave-focus — including dynamic fields and validation.
Analysis
Performance Notes
Approach
Cost
Best for
One delegated focusout on a form
Cheap
Many / dynamic fields, validation
Direct .on("blur") per field
Cheap
Few static inputs
Heavy work on every focusout
Expensive
Avoid — keep handlers light
Delegation usually wins for forms: one listener instead of N. Keep leave handlers small — validate one field, update a short message.
Remember
Key Takeaways
Role: bubbling leave-focus — parents can listen for nested blur.
API:.on("focusout", "input", fn) on the form.
vs blur: same idea, but blur does not bubble.
Pair: use focusin for enter, focusout for leave.
One line: use focusout when a parent form must react to nested leave-focus — including validation and dynamic fields.
Frequently Asked Questions
The focusout event fires when an element loses focus, or when any element inside it loses focus. Unlike blur, focusout bubbles up the DOM — so you can bind one handler on a parent form and validate when the user leaves any nested input. Bind with .on("focusout", handler) since jQuery 1.7.
Both relate to losing focus. blur fires only on the element that lost focus and does not bubble. focusout fires on that element and bubbles to ancestors — ideal for event delegation on forms. Use blur for single-field handlers; use focusout when one parent handler should cover all inputs.
Yes. Native focusout bubbles from the element that lost focus up through parents. That is why .on("focusout", "input", fn) on a form works. Since 1.4.2, jQuery also maps delegated .on("blur", "input", fn) to focusout internally.
They are opposites and both bubble. focusin fires when an element or its descendant gains focus. focusout fires when an element or its descendant loses focus. Pair them on a parent container for enter/exit tracking and validation.
Call .trigger("focusout") to run bound focusout handlers. To actually move keyboard focus away, tab elsewhere or call .trigger("blur") on the current input. Use .triggerHandler("focusout") to run handlers without side effects.
Prefer .on("focusout", handler) and .trigger("focusout"). The .focusout() shorthand binding form is deprecated since jQuery 3.3. See the .focusout() method tutorial for migration details.