The .blur() method is jQuery’s legacy shorthand for binding and triggering the blur event. This tutorial covers .blur(handler) since 1.0, .blur(eventData, handler) since 1.4.3, no-argument .blur() as a trigger, migration to .on("blur") and .trigger("blur"), and why the binding form is deprecated since jQuery 3.3. For the modern blur event API, see the jQuery blur event tutorial.
01
.blur(fn)
Bind handler
02
eventData
Since 1.4.3
03
.blur()
Trigger event
04
.on()
Modern bind
05
.trigger()
Modern fire
06
Deprecated
Since 3.3
Fundamentals
Introduction
Before jQuery 1.7 unified events with .on() and .off(), every common event had a matching shorthand — .blur(), .focus(), .change(), and more. The .blur() method let you validate a field in one short call: $("#email").blur(function(){ ... }). It remains in jQuery 3.x for backward compatibility but is marked deprecated.
Understanding .blur() matters when reading older form-validation tutorials and legacy codebases. The method does two distinct jobs: with a function argument it binds; with no arguments it triggers. Modern jQuery splits those roles explicitly — .on("blur", handler) for binding and .trigger("blur") for firing.
Concept
Understanding the .blur() Method
The official jQuery API describes .blur() as a way to bind an event handler to the blur event, or trigger that event on an element. When you pass a handler, jQuery registers it on each matched element and calls it when the user tabs away, clicks elsewhere, or focus moves programmatically — the same blur event that .on("blur") handles today.
When you call .blur() with no arguments, jQuery synthetically fires the blur event on each matched element. Bound handlers run — useful for forcing validation before form submit when the user never tabbed out of the active field. This trigger behavior is equivalent to .trigger("blur").
⚠️
Deprecated since jQuery 3.3
Do not use .blur(handler) or .blur(eventData, handler) in new code. Replace them with .on("blur", handler) or .on("blur", eventData, handler). Replace no-argument .blur() with .trigger("blur"). For delegation via focusout, non-bubbling behavior, and the full modern blur event guide, read the jQuery blur event tutorial.
Foundation
📝 Syntax
The .blur() method has three signatures from the official jQuery API. The binding forms are deprecated; the trigger form remains valid but .trigger("blur") is preferred:
All .blur() signatures return the original jQuery object for chaining.
Handler return values are ignored unless you use return false (equivalent to preventDefault() + stopPropagation()).
Cheat Sheet
⚡ Quick Reference
Goal
Legacy (.blur)
Modern replacement
Bind blur handler
$("#email").blur(fn) ⚠
$("#email").on("blur", fn)
Pass data to handler
$("#email").blur({ rule: "email" }, fn) ⚠
$("#email").on("blur", { rule: "email" }, fn)
Trigger blur programmatically
$("#target").blur()
$("#target").trigger("blur")
Trigger all matched inputs
$("input").blur()
$("input").trigger("blur")
Remove blur handlers
$("#email").off("blur")
$("#email").off("blur")
Delegated blur on form inputs
$("#form").on("blur", "input", fn) — not available via .blur()
Parent-level bubbling handler
$("#form").on("focusout", "input", fn) — use focusout, not .blur()
Compare
📋 .blur() vs .on("blur") vs .trigger("blur") vs .off("blur")
Four related APIs — know which one binds, which one fires, and which one removes handlers.
.blur()
deprecated
Legacy bind (.blur(fn)) or trigger (.blur()) — use modern APIs for new code
.on("blur")
bind
Modern binding since 1.7 — supports eventData and delegation on dynamic forms
.trigger("blur")
fire
Programmatically run handlers — clearer than no-arg .blur()
.off("blur")
remove
Unbind handlers — pair with .on("blur") when cleaning up or in SPAs
Hands-On
Examples Gallery
Five examples cover binding, eventData, triggering, migration from .blur() to .on("blur"), and method chaining. Use the Try-it links to run each snippet in the browser. Remember: binding with .blur(handler) is deprecated — these demos show legacy syntax you will encounter in older code.
📚 Binding & Triggering
Legacy .blur() signatures for binding handlers and firing events programmatically.
Example 1 — Bind Handler with .blur(handler)
The canonical legacy pattern — validate or react when the user leaves an input field.
jQuery
$( "#target" ).blur( function() {
$( "#out" ).text( "Handler ran via .blur(function(){ ... })." );
} );
User focuses #target, then tabs away or clicks elsewhere
→ handler runs, #out text updates
Deprecated — prefer .on("blur", fn) for new code
How It Works
.blur(fn) registers the function on the input. jQuery internally routes this to .on("blur", fn). The handler runs each time the field loses focus — tab key, click elsewhere, or programmatic trigger.
Example 2 — Pass eventData with .blur(eventData, handler)
Since jQuery 1.4.3, pass a validation rule object before the handler — it arrives as event.data.
jQuery
$( ".field" ).blur( { rule: "required" }, function( event ) {
var name = $( this ).attr( "name" );
var empty = $( this ).val().trim().length === 0;
$( "#out" ).text(
name + " | rule: " + event.data.rule + " | empty: " + empty
);
} );
Tab out of empty email field → "email | rule: required | empty: true"
Tab out of filled name field → "name | rule: required | empty: false"
Same handler, shared eventData on every .field input
How It Works
jQuery stores the { rule: "required" } object and injects it into event.data when any matched .field loses focus. Modern equivalent: .on("blur", { rule: "required" }, fn).
Example 3 — Trigger Blur with No-Argument .blur()
Calling .blur() without a handler fires the blur event programmatically — force validation before submit.
Tab away from #target → count increments
Click #fire → $("#target").blur() → same handler runs
No-arg .blur() is trigger shorthand — prefer .trigger("blur")
How It Works
The first .blur(function(){ ... }) binds a handler on #target. The button calls $("#target").blur() with no arguments — that synthetically fires blur. Replace with $("#target").trigger("blur") for clarity.
📈 Migration & Chaining
Compare legacy and modern APIs, and chain after .blur(handler).
Example 4 — Migration: .blur(fn) vs .on("blur", fn)
Both bind the same blur event — .on() is the recommended API for new code.
jQuery
$( "#legacy" ).blur( function() {
$( "#out" ).text( "Legacy: .blur(function(){ ... }) — deprecated since jQuery 3.3." );
} );
$( "#modern" ).on( "blur", function() {
$( "#out" ).text( "Modern: .on('blur', function(){ ... }) — use this for new code." );
} );
Tab out of #legacy → legacy deprecation message
Tab out of #modern → modern .on("blur") message
Behavior is identical — only the API name differs
How It Works
Under the hood, .blur(fn) calls .on("blur", fn). Migration is a straight rename with no behavior change for simple bindings. The advantage of .on() is delegation — $("#form").on("blur", "input", fn) — which .blur() cannot do.
Example 5 — Chaining After .blur(handler)
.blur(handler) returns the jQuery object — chain further methods immediately.
jQuery
$( "#email" )
.blur( function() {
var val = $( this ).val().trim();
$( this ).val( val );
$( "#out" ).text( "Trimmed on blur: " + val );
} )
.blur( function() {
$( this ).toggleClass( "touched", true );
} );
User types " jane@example.com " and tabs away
First handler trims value → "jane@example.com"
Second handler adds .touched class
Both handlers run in bind order on each blur
How It Works
Multiple .blur(fn) calls on the same element stack handlers — all run when focus leaves. Because each call returns the jQuery object, you can chain them fluently. The same chaining pattern works with .on("blur", fn).
Applications
🚀 Common Use Cases
Reading legacy code — recognize $("#email").blur(fn) as equivalent to .on("blur", fn) in older form scripts.
Field validation — legacy tutorials bind .blur() to validate email or required fields when the user tabs away.
Force validation on submit — $("#active-field").blur() before checking the form — replace with .trigger("blur").
Trim on exit — chained .blur(fn) calls trim whitespace and mark fields as touched.
Maintaining WordPress themes — many admin and front-end scripts still use .blur() — know how to migrate safely.
🧠 How .blur() Routes Through jQuery
1
You call .blur()
With a function argument, jQuery treats it as a bind request. With no arguments, it treats it as a trigger request.
dispatch
2
Bind path
.blur(handler) delegates internally to .on("blur", handler) — the handler is stored in jQuery’s event system.
.on("blur")
3
Trigger path
No-arg .blur() delegates to .trigger("blur") — bound handlers run when focus leaves.
.trigger("blur")
4
✎
jQuery object returned
Both paths return the original collection for chaining — .blur(fn).addClass("watched") works the same as .on("blur", fn).addClass("watched").
Important
📝 Notes
Deprecated since jQuery 3.3 — do not use .blur(handler) or .blur(eventData, handler) in new code. Use .on("blur") instead.
Bind with .blur(handler) since jQuery 1.0; eventData form since 1.4.3.
No-argument .blur() triggers the event since jQuery 1.0 — prefer .trigger("blur").
.blur() does not support event delegation — use .on("blur", selector, fn) or .on("focusout", selector, fn) for dynamic forms.
Native blur does not bubble — parent-level handlers need focusout, not direct .blur(fn) on the form.
Remove handlers with .off("blur") — not by calling .blur(undefined).
For the full modern blur event guide — delegation, focusout, and validation patterns — see the jQuery blur event tutorial.
Compatibility
Browser Support
The underlying blur event is a standard DOM focus event supported in every browser jQuery targets. The .blur() method itself is a jQuery API — it works in jQuery 1.x, 2.x, and 3.x. Binding via .blur(handler) is deprecated since 3.3 but still functional; triggering via no-arg .blur() also remains supported.
✓ jQuery 1.0+
jQuery .blur() method
Supported across all jQuery versions you are likely to maintain. Deprecated binding since 3.3 — use .on('blur') for new projects. Native equivalent for binding: element.addEventListener('blur', fn). Native equivalent for trigger: element.blur() or dispatchEvent.
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
.blur()Legacy API
Bottom line: Safe in legacy jQuery projects. Migrate bindings to .on('blur') and triggers to .trigger('blur') when updating form validation code.
Wrap Up
Conclusion
The jQuery .blur() method is the legacy shorthand for binding and triggering blur handlers. Use .blur(handler) or .blur(eventData, handler) to bind — both deprecated since jQuery 3.3. Use no-argument .blur() to trigger — equivalent to .trigger("blur").
For new code, prefer .on("blur", fn) for binding and .trigger("blur") for programmatic firing. When you encounter .blur() in older form scripts, recognize it, understand it, and migrate when practical. For delegation, focusout, and the complete modern blur event workflow, continue with the jQuery blur event tutorial.
Write new form validation with deprecated .blur(handler)
Assume .blur() supports delegation — it does not
Confuse .blur(fn) (bind) with .blur() (trigger)
Use .unbind("blur") — it is also deprecated; use .off("blur")
Copy deprecated patterns from old tutorials without modernizing them
Summary
Key Takeaways
Knowledge Unlocked
Six things to remember about .blur()
Legacy bind, modern migrate.
6
Core concepts
.blur01
.blur(fn)
Bind
Deprecated
data02
eventData
Since 1.4.3
Handler
()03
.blur()
Trigger
No args
.on04
.on("blur")
Modern
Replace
⚡05
.trigger()
Fire
Programmatic
3.306
Deprecated
Since 3.3
Migrate
❓ Frequently Asked Questions
The .blur() method has two roles. With a handler argument — .blur(handler) or .blur(eventData, handler) — it binds a function that runs when the matched element loses focus. With no arguments — .blur() — it triggers the blur event on each matched element, running bound handlers. Both forms have been part of jQuery since 1.0; the binding form 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) or .on('blur', eventData, handler) instead. The no-argument .blur() trigger form still works but .trigger('blur') is clearer and preferred in modern code. Existing legacy code continues to run in jQuery 3.x; migrate when you touch those files.
.blur(handler) registers a callback — it does not fire the event immediately. .blur() with no arguments triggers the blur event programmatically on every matched element, the same as .trigger('blur'). The handler form is deprecated for binding; the no-arg form is a trigger shorthand. Always check whether parentheses contain a function before reading legacy jQuery code.
Replace .blur(fn) with .on('blur', fn). Replace .blur(data, fn) with .on('blur', data, fn). Replace no-arg .blur() with .trigger('blur'). Replace .unbind('blur') cleanup with .off('blur'). Under the hood, .blur(handler) already delegates to .on('blur') — migration is a straight rename with no behavior change for simple bindings.
Yes. jQuery 3.x keeps .blur() for backward compatibility with jQuery 1.x and 2.x codebases. It still binds and triggers correctly. The API docs mark it deprecated to steer new projects toward .on() and .trigger(). Do not use .blur(handler) in new code — prefer the modern API covered in the jQuery blur event tutorial.
Since jQuery 1.4.3, you can pass an object as the first argument before the handler. jQuery attaches it to event.data inside the callback — for example, .blur({ rule: 'email' }, fn) lets fn read event.data.rule when validating. This avoids closures when the same handler serves multiple fields. The modern equivalent is .on('blur', { rule: 'email' }, fn).
Did you know?
jQuery unified event binding in version 1.7 with .on() and .off(), replacing shorthand methods like .blur(), .focus(), and .bind(). The old .blur(handler) still works but is deprecated since 3.3 — under the hood it delegates to .on("blur"). The separate no-argument .blur() remains valid as shorthand for .trigger("blur"), though .trigger("blur") is clearer in modern code.