1 line
926 B
JSON
1 line
926 B
JSON
{"name":"callbacks.disabled","type":"method","title":"callbacks.disabled()","deprecated":null,"removed":null,"desc":"Determine if the callbacks list has been disabled.","categories":["callbacks-object","version/1.7"],"entries":[{"return":"Boolean","signatures":{"added":"1.7"},"examples":{"desc":"Use <code>callbacks.disabled()</code> to determine if the callbacks list has been disabled:","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 logging function to the callback list\ncallbacks.add( foo );\n\n// Fire the items on the list, passing an argument\ncallbacks.fire( \"hello\" );\n// Outputs \"foo: hello\"\n\n// Disable the callbacks list\ncallbacks.disable();\n\n// Test the disabled state of the list\nconsole.log ( callbacks.disabled() );\n// Outputs: true\n"},"longdesc":""}]} |