jQuery callbacks.locked () method
Examples
Use callbacks.disabled () to determine whether the callback list is locked
$ (Function () {
// Simple test function
var foo = function ( value ) {
alert ( "Foo:" + value );}; Var . callbacks = $ Callbacks (); // add to the list of test function foo
callbacks. add ( foo ); // Invoke all callback parameters passed
callbacks. fire ( "Hello" ); // Output "foo: hello"
// Lock callback list
. callbacks lock (); // test callback list status
alert ( callbacks. locked () ); // True
})
try it"
Definition and Usage
callbacks.locked () callback function is used to determine whether the list is locked.
grammar
This method does not accept any parameters.
callbacks.locked()