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/animate | |
parent | ec6d88fae464ffb432df6c8d2ed06ee9fa5b4dae (diff) | |
parent | a1f604eb453208c80ec17c42c7bb4e3a1c624102 (diff) | |
download | jquery-ui-b30184d885329317b9dbd70835d2c4d154f98475.tar.gz jquery-ui-b30184d885329317b9dbd70835d2c4d154f98475.zip |
Merge with master
Diffstat (limited to 'demos/animate')
-rw-r--r-- | demos/animate/default.html | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/demos/animate/default.html b/demos/animate/default.html index 4fec428e7..307d030a6 100644 --- a/demos/animate/default.html +++ b/demos/animate/default.html @@ -15,22 +15,23 @@ </style> <script> $(function() { - $( "#button" ).toggle( - function() { + var state = true; + $( "#button" ).click(function() { + if ( state ) { $( "#effect" ).animate({ backgroundColor: "#aa0000", color: "#fff", width: 500 }, 1000 ); - }, - function() { + } else { $( "#effect" ).animate({ backgroundColor: "#fff", color: "#000", width: 240 }, 1000 ); } - ); + state = !state; + }); }); </script> </head> |