File tree 1 file changed +35
-0
lines changed
1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" ?>
2
+ <entry name =" callbacks.locked" type =" method" return =" Boolean" >
3
+ <title >callbacks.locked()</title >
4
+ <signature >
5
+ <added >1.7</added >
6
+ </signature >
7
+ <desc >Determine if the callbacks list has been disabled.</desc >
8
+ <longdesc />
9
+ <example >
10
+ <desc >Use <code >callbacks.disabled()</code > to determine if the callbacks list has been disabled:</desc >
11
+ <code ><![CDATA[ // a sample logging function to be added to a callbacks list
12
+ var foo = function( value ) {
13
+ console.log( "foo:" + value );
14
+ };
15
+
16
+ var callbacks = $.Callbacks();
17
+
18
+ // add the logging function to the callback list
19
+ callbacks.add( foo );
20
+
21
+ // fire the items on the list, passing an argument
22
+ callbacks.fire( "hello" );
23
+ // outputs "foo: hello"
24
+
25
+ // disable the callbacks list
26
+ callbacks.disable();
27
+
28
+ // test the disabled state of the list
29
+ console.log ( callbacks.disabled() );
30
+ // outputs: true
31
+ ]]> </code >
32
+ </example >
33
+ <category slug =" callbacks-object" />
34
+ <category slug =" version/1.7" />
35
+ </entry >
You can’t perform that action at this time.
0 commit comments