The disabled() method asks a simple question: has this Callbacks list been shut down with disable()? It returns true or false and does not change anything. This tutorial covers syntax, five examples, and how it pairs with disable(), locked(), and safe-fire patterns.
01
Syntax
callbacks.disabled()
02
Boolean
true / false
03
Read-only
No side effects
04
vs disable()
Check vs action
05
Guards
Before fire()
06
Plugins
Teardown checks
Fundamentals
Introduction
jQuery Callbacks lists can be permanently shut down with disable(). After teardown, you often need to know whether firing is still allowed — especially in shared utilities, plugin APIs, or code that runs long after initialization.
That is what disabled() is for. It is a status query, not an action. Calling it never disables or enables the list; it only reports the current state.
Concept
Understanding the disabled() Method
callbacks.disabled() returns true if disable() has been called on that list, and false otherwise. On a brand-new $.Callbacks() object, it always starts as false.
The old misconception — treating disabled() as the way to turn callbacks off — is incorrect. The action method is disable(); disabled() only reads the result.
💡
Beginner Tip
Memory trick: disable() does the job; disabled() ends in “d” like “done?” or “decided?” — it answers whether shutdown already happened.
Foundation
📝 Syntax
General form of callbacks.disabled:
jQuery
callbacks.disabled()
Parameters
None.
Return value
true if the list has been disabled; false if it is still active (never had disable() called).
locked() means the handler queue is frozen. disabled() means firing is permanently off. They are independent states.
Applications
🚀 Use Cases
Defensive fire helpers — skip or warn when a list is already disabled.
Plugin public API — expose isDestroyed() backed by disabled().
Unit tests — assert teardown called disable() by expecting disabled() to be true.
Conditional UI — hide “Subscribe” buttons when the event bus is off.
Debugging — log list state when mysterious silent no-ops occur.
🧠 How disabled() Fits the Lifecycle
1
Create list
$.Callbacks() → disabled() is false.
Active
2
disable()
Shutdown action runs — firing stops permanently.
Action
3
disabled()
Status check returns true; no state change.
Query
=
✅
Informed code paths
Callers know the bus is dead before they subscribe or fire.
Important
📝 Notes
disabled() is read-only — it never disables or enables the list.
Use disable() for the shutdown action; use disabled() to test the result.
Once disabled() returns true, it stays true for that object.
Do not confuse with locked(), which tracks lock() instead.
fire() on a disabled list is safe but silent — guards are optional but helpful.
Compatibility
Browser Support
callbacks.disabled() is part of jQuery’s Callbacks API since jQuery 1.7. It is available wherever jQuery runs.
✓ jQuery 1.7+
jQuery Callbacks.disabled()
Supported in jQuery 1.x, 2.x, and 3.x. Returns a boolean consistently across browsers.
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
callbacks.disabled()Universal
Bottom line: Safe in jQuery projects. Pair with disable() — action first, status check second.
Wrap Up
🎉 Conclusion
The callbacks.disabled() method answers one question: has this list been shut down? It returns a boolean and never changes state. Use disable() to turn firing off, then disabled() to verify teardown or guard shared fire helpers.
Next, explore empty() to clear handlers while keeping the list active, or review lock() / locked() for a different kind of freeze.
disabled() is a read-only status check. It returns true if disable() was called on the list, otherwise false. It does not disable anything itself — use disable() for the action.
disable() is the verb — it permanently shuts down the list. disabled() is the question — "is this list shut down?" It returns a boolean and leaves the list unchanged.
On a freshly created $.Callbacks() list, and on any list that has never had disable() called. Active lists that still accept fire() return false.
No. disabled() only reads state. jQuery provides no enable() method. Once disable() runs, disabled() stays true forever for that list object.
fire() on a disabled list is already a safe no-op, but checking disabled() first can avoid pointless calls and produce clearer logs in shared utilities or plugin code.
disabled() reflects whether disable() was called. locked() reflects whether lock() was called — a different state. A list can be locked but not disabled, or disabled (which also clears internal state).
Did you know?
jQuery names the pair consistently: disable() / disabled(), lock() / locked(), and fire() / fired() — action method plus past-tense status check.