diff options
author | Felix Nagel <info@felixnagel.com> | 2012-05-24 18:34:32 +0200 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2012-05-24 18:34:32 +0200 |
commit | b30184d885329317b9dbd70835d2c4d154f98475 (patch) | |
tree | 445acc2481e8456211c3e893e7789fe4b5978791 /demos/widget | |
parent | ec6d88fae464ffb432df6c8d2ed06ee9fa5b4dae (diff) | |
parent | a1f604eb453208c80ec17c42c7bb4e3a1c624102 (diff) | |
download | jquery-ui-b30184d885329317b9dbd70835d2c4d154f98475.tar.gz jquery-ui-b30184d885329317b9dbd70835d2c4d154f98475.zip |
Merge with master
Diffstat (limited to 'demos/widget')
-rw-r--r-- | demos/widget/default.html | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/demos/widget/default.html b/demos/widget/default.html index ece81218a..f39825034 100644 --- a/demos/widget/default.html +++ b/demos/widget/default.html @@ -139,11 +139,14 @@ }); // click to toggle enabled/disabled - $( "#disable" ).toggle(function() { + $( "#disable" ).click(function() { // use the custom selector created for each widget to find all instances - $( ":custom-colorize" ).colorize( "disable" ); - }, function() { - $( ":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" ); + } else { + $( ":custom-colorize" ).colorize( "disable" ); + } }); // click to set options after initalization |