We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 820cff8 commit 1da4d7eCopy full SHA for 1da4d7e
demos/animate/default.html
@@ -15,22 +15,23 @@
15
</style>
16
<script>
17
$(function() {
18
- $( "#button" ).toggle(
19
- function() {
+ var state = true;
+ $( "#button" ).click(function() {
20
+ if ( state ) {
21
$( "#effect" ).animate({
22
backgroundColor: "#aa0000",
23
color: "#fff",
24
width: 500
25
}, 1000 );
- },
26
+ } else {
27
28
backgroundColor: "#fff",
29
color: "#000",
30
width: 240
31
32
}
33
- );
+ state = !state;
34
+ });
35
});
36
</script>
37
</head>
0 commit comments