control-freak-ide/Control-Freak-Documentation/jQuery/docs/entries/callbacks.remove.json
plastic-hub-dev-node-saturn 538369cff7 latest
2021-05-12 18:35:18 +02:00

1 line
1.2 KiB
JSON

{"name":"callbacks.remove","type":"method","title":"callbacks.remove()","deprecated":null,"removed":null,"desc":"Remove a callback or a collection of callbacks from a callback list.","categories":["callbacks-object","version/1.7"],"entries":[{"return":"Callbacks","signatures":{"added":"1.7","argument":{"desc":"A function, or array of functions, that are to be removed from the callback list.","type":[{"name":"Function"},{"name":"Array"}],"name":"callbacks"}},"examples":{"desc":"Use <code>callbacks.remove()</code> to remove callbacks from a callback list:","code":"\n// A sample logging function to be added to a callbacks list\nvar foo = function( value ) {\n console.log( \"foo: \" + value );\n};\n\nvar callbacks = $.Callbacks();\n\n// Add the function \"foo\" to the list\ncallbacks.add( foo );\n\n// Fire the items on the list\ncallbacks.fire( \"hello\" );\n// Outputs: \"foo: hello\"\n\n// Remove \"foo\" from the callback list\ncallbacks.remove( foo );\n\n// Fire the items on the list again\ncallbacks.fire( \"world\" );\n\n// Nothing output as \"foo\" is no longer in the list\n"},"longdesc":"\n <p>This method returns the Callbacks object onto which it is attached (<code>this</code>).</p>\n "}]}