A function, or array of functions, that are to be added to the callback list.
A function, or array of functions, that are to be added to the callback list.
Disable a callback list from doing anything more.
Determine if the callbacks list has been disabled.
Remove all of the callbacks from a list.
Call all of the callbacks with the given arguments.
The argument or list of arguments to pass back to the callback list.
Call all callbacks in a list with the given context and arguments.
A reference to the context in which the callbacks in the list should be fired.
An argument, or array of arguments, to pass to the callbacks in the list.
Determine if the callbacks have already been called at least once.
Determine whether or not the list has any callbacks attached. If a callback is provided as an argument, determine whether it is in a list.
The callback to search for.
Lock a callback list in its current state.
Determine if the callbacks list has been locked.
Remove a callback or a collection of callbacks from a callback list.
A function, or array of functions, that are to be removed from the callback list.
Add a callback or a collection of callbacks to a callback list.
``
1.7
````Use callbacks.add() to add new callbacks to a callback list:
// A sample logging function to be added to a callbacks list var foo = function( value ) { console.log( "foo: " + value ); }; // Another function to also be added to the list var bar = function( value ) { console.log( "bar: " + value ); }; var callbacks = $.Callbacks(); // Add the function "foo" to the list callbacks.add( foo ); // Fire the items on the list callbacks.fire( "hello" ); // Outputs: "foo: hello" // Add the function "bar" to the list callbacks.add( bar ); // Fire the items on the list again callbacks.fire( "world" ); // Outputs: // "foo: world" // "bar: world"