diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2011-06-02 13:25:12 +0200 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2011-06-02 13:25:12 +0200 |
commit | cfaddbfb2a49fbd7f511d49f6404c7447469c5b0 (patch) | |
tree | aea71036900115f92dcfb70228359332bc6bd57d | |
parent | 92e37865a0734e7ea98b0dcf0e6519916c0434e3 (diff) | |
download | jquery-ui-cfaddbfb2a49fbd7f511d49f6404c7447469c5b0.tar.gz jquery-ui-cfaddbfb2a49fbd7f511d49f6404c7447469c5b0.zip |
Widget demo: Some more inline comments
-rw-r--r-- | demos/widget/default.html | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/demos/widget/default.html b/demos/widget/default.html index a9284a423..ec272e994 100644 --- a/demos/widget/default.html +++ b/demos/widget/default.html @@ -88,11 +88,17 @@ } }); + // initialize with default options $( '#my-widget1' ).colorize(); + + // initialize with two customized options $( '#my-widget2' ).colorize({ red: 60, blue: 60 }); + + // initialize with custom green value + // and a random callback to allow only colors with enough green $( '#my-widget3' ).colorize( { green: 128, random: function( event, ui ) { @@ -100,12 +106,14 @@ } }); + // click to toggle enabled/disabled $( '#disable' ).toggle(function() { $( ':custom-colorize' ).colorize( 'disable' ); }, function() { $( ':custom-colorize' ).colorize( 'enable' ); }); + // click to set options after initalization $( '#black' ).click( function() { $( ':custom-colorize' ).colorize( 'option', { red: 0, |