@@ -28,10 +28,10 @@ $(function() {
28
28
var el = $ ( this ) ;
29
29
el . addClass ( "current" ) . hide ( duration , function ( ) {
30
30
setTimeout ( function ( ) {
31
- el . show ( duration , function ( ) { el . removeClass ( "current" ) } ) ;
31
+ el . show ( duration , function ( ) { el . removeClass ( "current" ) ; } ) ;
32
32
} , wait ) ;
33
- } )
34
- } )
33
+ } ) ;
34
+ } ) ;
35
35
36
36
effect ( "#blindLeft" , "blind" , { direction : "left" } ) ;
37
37
effect ( "#blindUp" , "blind" , { direction : "up" } ) ;
@@ -61,7 +61,16 @@ $(function() {
61
61
62
62
effect ( "#puff" , "puff" , { times : 2 } ) ;
63
63
effect ( "#scale" , "scale" , { } ) ;
64
- effect ( "#size" , "size" , { from : { width : 300 , height : 300 } } ) ;
64
+ effect ( "#size" , "size" , { } ) ;
65
+ $ ( "#sizeToggle" ) . bind ( "click" , function ( ) {
66
+ var opts = { to : { width : 300 , height : 300 } } ;
67
+ $ ( this ) . addClass ( 'current' )
68
+ . toggle ( "size" , opts , duration )
69
+ . delay ( wait )
70
+ . toggle ( "size" , opts , duration , function ( ) {
71
+ $ ( this ) . removeClass ( "current" ) ;
72
+ } ) ;
73
+ } ) ;
65
74
66
75
$ ( "#shake" ) . bind ( "click" , function ( ) { $ ( this ) . addClass ( "current" ) . effect ( "shake" , { } , 100 , function ( ) { $ ( this ) . removeClass ( "current" ) ; } ) ; } ) ;
67
76
@@ -83,13 +92,13 @@ $(function() {
83
92
$ ( "#removeClass" ) . click ( function ( ) {
84
93
$ ( this ) . addClass ( "current" ) . removeClass ( function ( ) {
85
94
window . console && console . log ( arguments ) ;
86
- return "current"
95
+ return "current" ;
87
96
} , duration ) ;
88
97
} ) ;
89
98
$ ( "#toggleClass" ) . click ( function ( ) {
90
99
$ ( this ) . toggleClass ( function ( ) {
91
100
window . console && console . log ( arguments ) ;
92
- return "current"
101
+ return "current" ;
93
102
} , duration ) ;
94
103
} ) ;
95
104
} ) ;
0 commit comments