YouTip LogoYouTip

Misc Callbacks Disable

# jQuery callbacks.disable() Method [![Image 3: jQuery Misc Methods](#)jQuery Misc Methods](#) ## Example Disable a callback in the callback list $(function(){// A simple function to be added to the list var foo = function(value){alert(value); }; var callbacks = $.Callbacks(); // Add the above function to the callback list callbacks.add(foo); // Fire all callback list functions with arguments callbacks.fire("foo"); // Output: foo // Disable the callbacks callbacks.disable(); // Try to fire with "foobar" as argument callbacks.fire("foobar"); // "foobar" will not be output}) [Try it Β»](#) * * * ## Definition and Usage The `callbacks.disable()` function is used to disable callbacks in a callback list. **Note:** This method returns the callback object back to its bound callback list. * * * ## Syntax This method does not accept any arguments. callbacks.disable() * * jQuery Misc Methods](#)
← Misc Callbacks FiredMisc Pushstack β†’