Skip to content
Permalink
Browse files

Spinner demo: Don't use .toggle(fn).

  • Loading branch information...
scottgonzalez committed May 21, 2012
1 parent 5455b15 commit 33a91fb19e19e238a4f841908f2a0c8d56fa2162
Showing with 13 additions and 9 deletions.
  1. +13 −9 demos/spinner/default.html
@@ -14,16 +14,20 @@
<script>
$(function() {
var spinner = $( "#spinner" ).spinner();
$( "#disable" ).toggle(function() {
spinner.spinner( "disable" );
}, function() {
spinner.spinner( "enable" );
$( "#disable" ).click(function() {
if ( spinner.spinner( "option", "disabled" ) ) {
spinner.spinner( "enable" );
} else {
spinner.spinner( "disable" );
}
});
$( "#destroy" ).toggle(function() {
spinner.spinner( "destroy" );
}, function() {
spinner.spinner();
$( "#destroy" ).click(function() {
if ( spinner.data( "ui-spinner" ) ) {
spinner.spinner( "destroy" );
} else {
spinner.spinner();
}
});
$( "#getvalue" ).click(function() {
alert( spinner.spinner( "value" ) );

0 comments on commit 33a91fb

Please sign in to comment.
You can’t perform that action at this time.