@@ -28,10 +28,10 @@ $(function() {
2828 var el = $ ( this ) ;
2929 el . addClass ( "current" ) . hide ( duration , function ( ) {
3030 setTimeout ( function ( ) {
31- el . show ( duration , function ( ) { el . removeClass ( "current" ) } ) ;
31+ el . show ( duration , function ( ) { el . removeClass ( "current" ) ; } ) ;
3232 } , wait ) ;
33- } )
34- } )
33+ } ) ;
34+ } ) ;
3535
3636 effect ( "#blindLeft" , "blind" , { direction : "left" } ) ;
3737 effect ( "#blindUp" , "blind" , { direction : "up" } ) ;
@@ -61,7 +61,16 @@ $(function() {
6161
6262 effect ( "#puff" , "puff" , { times : 2 } ) ;
6363 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+ } ) ;
6574
6675 $ ( "#shake" ) . bind ( "click" , function ( ) { $ ( this ) . addClass ( "current" ) . effect ( "shake" , { } , 100 , function ( ) { $ ( this ) . removeClass ( "current" ) ; } ) ; } ) ;
6776
@@ -83,13 +92,13 @@ $(function() {
8392 $ ( "#removeClass" ) . click ( function ( ) {
8493 $ ( this ) . addClass ( "current" ) . removeClass ( function ( ) {
8594 window . console && console . log ( arguments ) ;
86- return "current"
95+ return "current" ;
8796 } , duration ) ;
8897 } ) ;
8998 $ ( "#toggleClass" ) . click ( function ( ) {
9099 $ ( this ) . toggleClass ( function ( ) {
91100 window . console && console . log ( arguments ) ;
92- return "current"
101+ return "current" ;
93102 } , duration ) ;
94103 } ) ;
95104} ) ;
0 commit comments