jQuery callbacks.disable () method
Examples
Disable the callback function callback list
$ (Function () {
// Will be added to a list of simple functions
var foo = function ( value ) {
alert ( value );}; Var . callbacks = $ Callbacks (); // add the above function to the callback list
callbacks. add ( foo ); // Passing parameters to call all the callback function list
callbacks. fire ( "Foo" ); // Output: foo
// Disable callback function
. callbacks disable (); // try to use "foobar" as an argument
callbacks. fire ( "Foobar" ); // Foobar is not output
})
try it"
Definition and Usage
callbacks.disable () function is used to disable the callback list callback.
Tip: This method returns a callback object to the callback list it binding.
grammar
This method does not accept any parameters.
callbacks.disable()