jQuery callbacks.disabled() method
Example
Determine whether a callback list has been disabled
$
(
function
(
)
{
//
A simple function to be added to the callback list
var
foo
=
function
(
value
)
{
alert
(
"
foo:
"
value
)
;
}
;
var
callbacks
= $.
Callbacks
(
)
;
//
Add a function to the callback list
callbacks
.
add
(
foo
)
;
//
Pass an argument to the list parameter
callbacks
.
fire
(
"
hello
"
)
;
//
Output "foo: hello"
//
Disable the callback list
callbacks
.
disable
(
)
;
//
Test the disabled state of the list
alert
(
callbacks
.
disabled
(
)
)
;
//
Output: true
}
)
Try it »
Definition and Usage
The callbacks.disabled() function is used to determine whether a callback list has been disabled.
Syntax
This method does not accept any parameters.
callbacks.disabled()
jQuery Miscellaneous Methods