We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb91d90 commit 24b7ff1Copy full SHA for 24b7ff1
demos/widget/default.html
@@ -139,11 +139,14 @@
139
});
140
141
// click to toggle enabled/disabled
142
- $( "#disable" ).toggle(function() {
+ $( "#disable" ).click(function() {
143
// use the custom selector created for each widget to find all instances
144
- $( ":custom-colorize" ).colorize( "disable" );
145
- }, function() {
146
- $( ":custom-colorize" ).colorize( "enable" );
+ // all instances are toggled together, so we can check the state from the first
+ if ( $( ":custom-colorize" ).colorize( "option", "disabled" ) ) {
+ $( ":custom-colorize" ).colorize( "enable" );
147
+ } else {
148
+ $( ":custom-colorize" ).colorize( "disable" );
149
+ }
150
151
152
// click to set options after initalization
0 commit comments