jQuery Callbacks fired() Method

Beginner
⏱️ 8 min read
📚 Updated: Jul 2026
🎯 5 Examples
🚀 5 Try-it labs
Status check

What You’ll Learn

The fired() method asks whether a Callbacks list has been invoked at least once via fire() or fireWith(). It returns a boolean and changes nothing. This tutorial covers syntax, five examples, and how it pairs with fire(), the once flag, and disabled().

01

Syntax

callbacks.fired()

02

Boolean

true / false

03

Read-only

No side effects

04

vs fire()

Check vs action

05

once

Stays true

06

Init

Guard duplicates

Introduction

After you call fire(), handlers run — but other code may need to know whether that already happened. Did initialization fire? Should a late subscriber expect replay (with the memory flag)? Should we skip a second trigger?

fired() answers those questions. It is the status companion to fire(), just as disabled() complements disable().

Understanding the fired() Method

callbacks.fired() returns true once fire() or fireWith() has executed on that list at least one time. On a brand-new list that has never fired, it returns false.

It does not tell you whether individual handlers ran successfully, nor does it accept flags or arguments. The old reference incorrectly documented fired(flags) — that parameter does not exist in jQuery.

💡
Beginner Tip

Memory trick: fire() does it; fired() asks “did it happen?” — same pattern as disable() / disabled().

📝 Syntax

General form of callbacks.fired:

jQuery
callbacks.fired()

Parameters

  • None.

Return value

  • true if the list has fired at least once; false otherwise.

Basic pattern

jQuery
const callbacks = $.Callbacks();



console.log(callbacks.fired()); // false



callbacks.fire();

console.log(callbacks.fired()); // true

⚡ Quick Reference

GoalCode
Check if list firedif (callbacks.fired()) { ... }
Invoke handlerscallbacks.fire()
Never fired yetfired()false
After first firefired()true
List shut down?callbacks.disabled()

📋 fire() vs fired()

Action method versus read-only invocation status.

fire()
action

Runs all handlers in the list

fired()
boolean

Has fire ever been called?

Side effect
yes / no

fire yes; fired no

Parameters
args / none

fire takes args; fired takes none

Examples Gallery

Each example shows a different use of the boolean from fired().

📚 Getting Started

Status flips from false to true after the first fire.

Example 1 — Before and After fire()

Query status on a fresh list, fire once, then query again.

jQuery
const callbacks = $.Callbacks();



console.log("Before fire:", callbacks.fired()); // false



callbacks.add(function () {

  console.log("Handler ran");

});



callbacks.fire();

console.log("After fire:", callbacks.fired());  // true
Try It Yourself

How It Works

Even an empty fire() (no handlers) still sets fired() to true — the list was invoked.

Example 2 — fired() on a once List

Second fire() is ignored, but fired() stays true.

jQuery
const callbacks = $.Callbacks("once");



callbacks.add(function () { console.log("Runs once"); });



callbacks.fire();

callbacks.fire(); // ignored by once flag



console.log("fired():", callbacks.fired()); // true
Try It Yourself

How It Works

fired() tracks invocation attempts, not how many handlers printed output on the last fire.

📈 Practical Patterns

Guards, memory replay, and status comparisons.

Example 3 — Fire Init Only Once

Skip duplicate initialization if the ready list already fired.

jQuery
const onReady = $.Callbacks("once");



function triggerReady() {

  if (onReady.fired()) {

    console.log("Already initialized — skipping");

    return;

  }

  onReady.fire("ready");

}



onReady.add(function (msg) { console.log("Init:", msg); });



triggerReady(); // → Init: ready

triggerReady(); // → Already initialized — skipping
Try It Yourself

How It Works

Combining once with an explicit fired() guard makes init logic obvious in logs and tests.

Example 4 — Late Subscribe With memory

Fire first, then check fired() when a handler registers late.

jQuery
const callbacks = $.Callbacks("memory");



callbacks.fire("app-ready");

console.log("After early fire, fired():", callbacks.fired()); // true



callbacks.add(function (state) {

  console.log("Late handler:", state);

});

// → Late handler: app-ready  (memory replays args)
Try It Yourself

How It Works

When fired() is true and the list has memory, new add() callbacks run immediately with stored arguments.

Example 5 — fired() vs disabled()

These status methods answer different questions about the same list.

jQuery
const callbacks = $.Callbacks();



callbacks.fire();

console.log("fired:", callbacks.fired());     // true

console.log("disabled:", callbacks.disabled()); // false



const dead = $.Callbacks();

console.log("never fired:", dead.fired());      // false

dead.disable();

console.log("disabled:", dead.disabled());      // true
Try It Yourself

How It Works

A list can be fired but still active, or disabled without ever firing. Check the status that matches your question.

🚀 Use Cases

  • Init guards — prevent double-firing setup callbacks.
  • Late subscribers — branch logic when fired() is already true (often with memory).
  • Plugin lifecycle — expose isReady() backed by fired().
  • Unit tests — assert fire() was called on a spy list.
  • Debugging — explain why a second fire() on a once list did nothing.

🧠 How fired() Fits the Lifecycle

1

New list

fired() is false — nothing invoked yet.

Pending
2

fire()

Handlers run (if any). Internal fired flag set to true.

Invoke
3

fired()

Status query returns true; no state change.

Query
=

Informed flow control

Code knows whether the bus has ever been triggered.

📝 Notes

  • fired() takes no parameters — flags belong on $.Callbacks() at creation.
  • fireWith() also sets the fired state to true.
  • After the first fire, fired() remains true even if handlers are later empty()d.
  • Do not confuse with disabled(), which tracks disable() instead.
  • On disabled lists, fired() still reflects whether fire happened before disable.

Browser Support

callbacks.fired() is part of jQuery’s Callbacks API since jQuery 1.7 and works wherever jQuery runs.

jQuery 1.7+

jQuery Callbacks.fired()

Supported in jQuery 1.x, 2.x, and 3.x. Returns a boolean consistently across browsers.

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
callbacks.fired() Universal

Bottom line: Safe in jQuery projects. Use fire() to invoke; use fired() to check invocation history.

🎉 Conclusion

The callbacks.fired() method tells you whether a Callbacks list has been invoked at least once. It is read-only, takes no arguments, and pairs naturally with fire() and the once / memory flags.

Next, learn fireWith() to invoke handlers with a custom this context and argument array.

💡 Best Practices

✅ Do

  • Use fired() for init and readiness checks
  • Pair with once for one-time hooks
  • Expose isReady() wrapping fired() in plugins
  • Assert fired() in tests after fire()
  • Combine with memory for late subscribers

❌ Don’t

  • Pass flags to fired() — unsupported
  • Expect fired() to invoke handlers
  • Confuse it with disabled()
  • Assume fired() resets after empty()
  • Check individual handler status — it is list-level only

Key Takeaways

Knowledge Unlocked

Five things to remember about fired()

Invocation status for Callbacks lists.

5
Core concepts
T/F 02

Boolean

Ever invoked?

Return
03

fire()

Sets true

Action
04

once

Stays true

Flag
🚫 05

disabled()

Different check

Compare

❓ Frequently Asked Questions

fired() is a read-only status check. It returns true if fire() or fireWith() has been called on the list at least once, otherwise false. It does not fire anything itself.
No. Unlike the old incorrect documentation sometimes found online, fired() takes no arguments. Flags belong on $.Callbacks("once memory") at creation time, not on fired().
fire() is the action — it invokes handlers. fired() is the question — "has this list been invoked at least once?" It returns a boolean and does not change state.
After the first successful fire() or fireWith() call on that list. It stays true even if later fire() calls are ignored (for example on a once list).
fired() tracks whether invocation happened. disabled() tracks whether disable() shut the list down. A list can be fired but not disabled, or disabled without ever firing.
Common uses: skip duplicate init fires, assert teardown only after init ran, debug why late subscribers did not run (with memory flag), and write tests that verify fire() was called.
Did you know?

jQuery uses the same naming pattern for Callbacks status methods: fire() / fired(), disable() / disabled(), and lock() / locked() — verb for action, past participle for the boolean check.

Continue to fireWith()

Learn how to invoke handlers with a custom context and argument array.

fireWith() 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