mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Spinner demo: Don't use .toggle(fn).
This commit is contained in:
parent
5455b1599f
commit
33a91fb19e
@ -15,15 +15,19 @@
|
||||
$(function() {
|
||||
var spinner = $( "#spinner" ).spinner();
|
||||
|
||||
$( "#disable" ).toggle(function() {
|
||||
spinner.spinner( "disable" );
|
||||
}, function() {
|
||||
$( "#disable" ).click(function() {
|
||||
if ( spinner.spinner( "option", "disabled" ) ) {
|
||||
spinner.spinner( "enable" );
|
||||
} else {
|
||||
spinner.spinner( "disable" );
|
||||
}
|
||||
});
|
||||
$( "#destroy" ).toggle(function() {
|
||||
$( "#destroy" ).click(function() {
|
||||
if ( spinner.data( "ui-spinner" ) ) {
|
||||
spinner.spinner( "destroy" );
|
||||
}, function() {
|
||||
} else {
|
||||
spinner.spinner();
|
||||
}
|
||||
});
|
||||
$( "#getvalue" ).click(function() {
|
||||
alert( spinner.spinner( "value" ) );
|
||||
|
Loading…
Reference in New Issue
Block a user