Latest web development tutorials

jQuery callbacks.disabled () method

jQuery Misc Methods jQuery Misc Methods

Examples

Determine whether the callback list has been disabled

$ (Function () { // Will be added to the callback list is a simple function var foo = function ( value ) { alert ( "Foo:" + value );}; Var . callbacks = $ Callbacks (); // add a function to the callback list callbacks. add ( foo ); // Pass in a parameter in the parameter list callbacks. fire ( "Hello" ); // Output "foo: hello" // Disable callback list . callbacks disable (); // test disabled list alert ( callbacks. disabled () ); // Output: true })

try it"

Definition and Usage

callbacks.disabled () function is used to determine whether the callback list has been disabled.


grammar

This method does not accept any parameters.

callbacks.disabled()


jQuery Misc Methods jQuery Misc Methods