Easy Tutorial
❮ Ajax Load Sel Multipleattribute Equal Value ❯

jQuery callbacks.locked() Method

jQuery Miscellaneous Methods

Example

Determine if the callback list has been locked using callbacks.disabled().

$(function () { 
    // Simple test function
    var foo = function( value ) {
        alert( "foo:" + value );
    };    
    var callbacks = $.Callbacks();    
    // Add test function foo to the list
    callbacks.add( foo );    
    // Invoke all callbacks with the argument "hello"
    callbacks.fire( "hello" );
    // Outputs "foo: hello"    
    // Lock the callback list
    callbacks.lock();
    // Test the state of the callback list
    alert( callbacks.locked() );
    // true
})

Definition and Usage

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


Syntax

This method does not accept any parameters.


jQuery Miscellaneous Methods

❮ Ajax Load Sel Multipleattribute Equal Value ❯