{"name":"callbacks.has","type":"method","title":"callbacks.has()","deprecated":null,"removed":null,"desc":"Determine whether a supplied callback is in a list","categories":["callbacks-object","version/1.7"],"entries":[{"return":"Boolean","signatures":{"added":"1.7","argument":{"desc":"The callback to search for.","name":"callback","type":"Function"}},"examples":{"desc":"Use callbacks.has() to check if a callback list contains a specific callback:","code":"\n// A sample logging function to be added to a callbacks list\nvar foo = function( value1, value2 ) {\n console.log( \"Received: \" + value1 + \",\" + value2 );\n};\n\n// A second function which will not be added to the list\nvar bar = function( value1, value2 ) {\n console.log( \"foobar\" );\n};\n\nvar callbacks = $.Callbacks();\n\n// Add the log method to the callbacks list\ncallbacks.add( foo );\n\n// Determine which callbacks are in the list\nconsole.log( callbacks.has( foo ) );\n// true\nconsole.log( callbacks.has( bar ) );\n// false\n"},"longdesc":""}]}