## callbacks.has( [callback ] )Returns: Boolean

Description: 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.

- #### version added: 1.7 callbacks.has( [callback ] )

  - callback
    Type: Function()
    The callback to search for.

## Example:

Use `callbacks.has()` to check if a callback list contains a specific callback:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
    // A sample logging function to be added to a callbacks listvar foo = function( value1, value2 ) {  console.log( "Received: " + value1 + "," + value2 );}; // A second function which will not be added to the listvar bar = function( value1, value2 ) {  console.log( "foobar" );}; var callbacks = $.Callbacks(); // Add the log method to the callbacks listcallbacks.add( foo ); // Determine which callbacks are in the listconsole.log( callbacks.has( foo ) );// trueconsole.log( callbacks.has( bar ) );// false