diff options
Diffstat (limited to 'tests/visual/effects')
-rw-r--r-- | tests/visual/effects/effects.js | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/tests/visual/effects/effects.js b/tests/visual/effects/effects.js index 114dcc2a6..0b0de96f4 100644 --- a/tests/visual/effects/effects.js +++ b/tests/visual/effects/effects.js @@ -1,4 +1,4 @@ -$(function() { +$( function() { var duration = 1000, wait = 500; @@ -6,19 +6,20 @@ var duration = 1000, function effect( elem, name, options ) { $.extend( options, { easing: "easeOutQuint" - }); + } ); $( elem ).on( "click", function() { $( this ) .addClass( "current" ) + // delaying the initial animation makes sure that the queue stays in tact .delay( 10 ) .hide( name, options, duration ) .delay( wait ) .show( name, options, duration, function() { $( this ).removeClass( "current" ); - }); - }); + } ); + } ); } $( "#hide" ).on( "click", function() { @@ -28,8 +29,8 @@ $( "#hide" ).on( "click", function() { .delay( wait ) .show( duration, function() { $( this ).removeClass( "current" ); - }); -}); + } ); +} ); effect( "#blindLeft", "blind", { direction: "left" } ); effect( "#blindUp", "blind", { direction: "up" } ); @@ -68,16 +69,16 @@ $( "#sizeToggle" ).on( "click", function() { .delay( wait ) .toggle( "size", options, duration, function() { $( this ).removeClass( "current" ); - }); -}); + } ); +} ); $( "#shake" ).on( "click", function() { $( this ) .addClass( "current" ) .effect( "shake", {}, 100, function() { $( this ).removeClass( "current" ); - }); -}); + } ); +} ); effect( "#slideDown", "slide", { direction: "down" } ); effect( "#slideUp", "slide", { direction: "up" } ); @@ -89,19 +90,19 @@ $( "#transfer" ).on( "click", function() { .addClass( "current" ) .effect( "transfer", { to: "div:eq(0)" }, 1000, function() { $( this ).removeClass( "current" ); - }); -}); + } ); +} ); $( "#addClass" ).on( "click", function() { $( this ).addClass( "current", duration, function() { $( this ).removeClass( "current" ); - }); -}); + } ); +} ); $( "#removeClass" ).on( "click", function() { $( this ).addClass( "current" ).removeClass( "current", duration ); -}); +} ); $( "#toggleClass" ).on( "click", function() { $( this ).toggleClass( "current", duration ); -}); +} ); -}); +} ); |