YouTip LogoYouTip

Misc Callbacks Locked

# jQuery callbacks.locked() Method [![Image 3: jQuery Misc Methods](#)jQuery Misc Methods](#) ## Example Use callbacks.disabled() to determine if the callback list has been locked $(function(){// Simple test function var foo = function(value){alert("foo:" + value); }; var callbacks = $.Callbacks(); // Add test function foo to the list callbacks.add(foo); // Fire all callbacks with parameters callbacks.fire("hello"); // Output "foo: hello" // Lock the callback list callbacks.lock(); // Test the state of the callback list alert(callbacks.locked()); // true}) [Try it Β»](#) * * * ## 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. callbacks.locked() * * jQuery Misc Methods](#)
← Misc Deferred DoneMisc Callbacks Fired β†’