Easy Tutorial
❮ Index Event Which ❯

jQuery callbacks.disabled() Method

jQuery Miscellaneous Methods

Example

Determine if the callback list has been disabled.

$(function () { 
    // A simple function to 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 a parameter through the list
    callbacks.fire( "hello" );
    // Outputs "foo: hello"    
    // Disable the callback list
    callbacks.disable();
    // Test the disabled status of the list
    alert( callbacks.disabled() );
    // Outputs: true
})

Definition and Usage

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


Syntax

This method does not accept any parameters.


jQuery Miscellaneous Methods

❮ Index Event Which ❯