Latest web development tutorials

jQuery callbacks.fired () method

jQuery Misc Methods jQuery Misc Methods

Examples

Determine whether the callback has been called at least once

$ (Function () { // Will be added to the list a simple function var foo = function ( value ) { alert ( "Foo:" + value );}; Var . callbacks = $ Callbacks (); // add the function "foo" to the list callbacks. add ( foo ); // Parameters passed to call all the callback list callbacks. fire ( "Hello" ); // Output: "foo: hello" callbacks. fire ( "World" ); // Output: "foo: world" // Test whether the list is to be called back once alert ( callbacks. fired () );})

try it"

Definition and Usage

callbacks.fired () function to determine if a callback has been called at least once.


grammar

This method does not accept any parameters.

callbacks.fired()


jQuery Misc Methods jQuery Misc Methods