jQuery callbacks.disabled()Method
Example
Determine whether the callback list has been disabled
$(function () {
//A simple function that will 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 in 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 yourself »
Definition and Usage
The callbacks.disabled() function is used to determine whether the callback list has been disabled.
Syntax
This method does not accept any parameters.
callbacks.disabled()
Other Extensions
jQuery Miscellaneous Methods