jQuery callbacks.locked() method
Example
Use callbacks.disabled() to determine whether the callback list has been locked
$
(
function
(
)
{
//
A simple test function
var
foo
=
function
(
value
)
{
alert
(
"
foo:
"
value
)
;
}
;
var
callbacks
= $.
Callbacks
(
)
;
//
Add the test function foo to the list
callbacks
.
add
(
foo
)
;
//
Call all callbacks with the given arguments
callbacks
.
fire
(
"
hello
"
)
;
//
Output "foo: hello"
//
Lock the callback list
callbacks
.
lock
(
)
;
//
Test the state of the callback list
alert
(
callbacks
.
locked
(
)
)
;
//
true
}
)
Try it »
Definition and Usage
The callbacks.locked() function is used to determine whether a callback list has been locked.
Syntax
This method does not accept any parameters.
callbacks.locked()
jQuery Miscellaneous Methods