aboutsummaryrefslogtreecommitdiffstats
path: root/demos/animate
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2012-05-24 18:34:32 +0200
committerFelix Nagel <info@felixnagel.com>2012-05-24 18:34:32 +0200
commitb30184d885329317b9dbd70835d2c4d154f98475 (patch)
tree445acc2481e8456211c3e893e7789fe4b5978791 /demos/animate
parentec6d88fae464ffb432df6c8d2ed06ee9fa5b4dae (diff)
parenta1f604eb453208c80ec17c42c7bb4e3a1c624102 (diff)
downloadjquery-ui-b30184d885329317b9dbd70835d2c4d154f98475.tar.gz
jquery-ui-b30184d885329317b9dbd70835d2c4d154f98475.zip
Merge with master
Diffstat (limited to 'demos/animate')
-rw-r--r--demos/animate/default.html11
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>