diff options
author | Alexander Schmitz <arschmitz@gmail.com> | 2015-08-24 09:32:42 -0400 |
---|---|---|
committer | Alexander Schmitz <arschmitz@gmail.com> | 2015-09-11 08:36:41 -0400 |
commit | f520f9ef4231a0abf58c24d0811bb8f598e4dd86 (patch) | |
tree | 12056cc3df469024a4143800742fed2aa37ddff7 /tests/visual/effects | |
parent | e021e4d6e22dff80ec3a8ba84266508d34944a35 (diff) | |
download | jquery-ui-f520f9ef4231a0abf58c24d0811bb8f598e4dd86.tar.gz jquery-ui-f520f9ef4231a0abf58c24d0811bb8f598e4dd86.zip |
Effects: Style updates
Ref #14246
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 ); -}); +} ); -}); +} ); |