jQuery .blur() Method

Beginner
⚠️ Deprecated since 3.3
⏱️ 10 min read
📚 Updated: Jul 2026
🎯 5 Examples
🚀 5 Try-it labs
Form events

What You’ll Learn

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

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.

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.

📝 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:

1. Bind a handler — .blur( handler ) (since 1.0, deprecated 3.3)

jQuery
.blur( handler )
  • handler — function executed each time blur fires: function( event ) { ... }.
  • Returns the jQuery object for chaining.
  • Modern replacement: .on( "blur", handler ).

2. Bind with eventData — .blur( [eventData], handler ) (since 1.4.3, deprecated 3.3)

jQuery
.blur( [eventData], handler )
  • eventData — optional object available in the handler as event.data.
  • Modern replacement: .on( "blur", eventData, handler ).

3. Trigger the event — .blur() (since 1.0)

jQuery
.blur()
  • No arguments — triggers blur on every matched element.
  • Runs bound blur handlers.
  • Preferred replacement: .trigger( "blur" ).

Official jQuery API migration note

jQuery
// Deprecated binding
$( "#target" ).blur( function() {
  alert( "Handler for `blur` called." );
} );

// Modern binding
$( "#target" ).on( "blur", function() {
  alert( "Handler for `blur` called." );
} );

// Deprecated trigger
$( "#target" ).blur();

// Modern trigger
$( "#target" ).trigger( "blur" );

Return value

  • All .blur() signatures return the original jQuery object for chaining.
  • Handler return values are ignored unless you use return false (equivalent to preventDefault() + stopPropagation()).

⚡ Quick Reference

GoalLegacy (.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()

📋 .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

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(){ ... })." );
} );
Try It Yourself

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
  );
} );
Try It Yourself

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.

jQuery
var count = 0;

$( "#target" ).blur( function() {
  count++;
  $( "#out" ).text( "Target blur handler fired (count: " + count + ")" );
} );

$( "#fire" ).click( function() {
  $( "#target" ).blur();
} );
Try It Yourself

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." );
} );
Try It Yourself

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 );
  } );
Try It Yourself

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).

🚀 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").
  • Shared eventData$(".field").blur({ rule: "email" }, fn) passes validation metadata without closures.
  • 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").

📝 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.

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 Chrome All versions · Desktop & Mobile
Full support
Mozilla Firefox All versions · Desktop & Mobile
Full support
Apple Safari All versions · macOS & iOS
Full support
Microsoft Edge All versions · Chromium & Legacy
Full support
Internet Explorer IE 6+ · Legacy environments
Full support
Opera All 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.

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.

💡 Best Practices

✅ Do

  • Use .on("blur", handler) for all new blur bindings
  • Use .trigger("blur") instead of no-arg .blur()
  • Migrate .blur(fn) to .on("blur", fn) when refactoring legacy files
  • Use .off("blur") to remove handlers cleanly
  • Read the modern blur event tutorial for focusout delegation

❌ Don’t

  • 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

Key Takeaways

Knowledge Unlocked

Six things to remember about .blur()

Legacy bind, modern migrate.

6
Core concepts
data 02

eventData

Since 1.4.3

Handler
() 03

.blur()

Trigger

No args
.on 04

.on("blur")

Modern

Replace
05

.trigger()

Fire

Programmatic
3.3 06

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.

Learn the modern blur event API

Prefer .on("blur") and .trigger("blur") — full tutorial with five try-it labs.

blur event tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

6 people found this page helpful