diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-03-09 10:01:07 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-03-09 10:01:07 -0500 |
commit | 3875cf63e4bef49b0da888bc9c8e60b9512cbf60 (patch) | |
tree | 42387525b2207be91b9da7060d5d0de5c9b08f9e /tests/visual/effects.all.js | |
parent | fa7f5d2873b1fef978eab7d9f342c5afa77e061c (diff) | |
parent | 74cff5d57ae35ee05bff1138b1833e896997665d (diff) | |
download | jquery-ui-3875cf63e4bef49b0da888bc9c8e60b9512cbf60.tar.gz jquery-ui-3875cf63e4bef49b0da888bc9c8e60b9512cbf60.zip |
Merge branch 'effects-api' of https://github.com/gnarf37/jquery-ui into gnarf37-effects-api
Diffstat (limited to 'tests/visual/effects.all.js')
-rw-r--r-- | tests/visual/effects.all.js | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/tests/visual/effects.all.js b/tests/visual/effects.all.js index 0479c47ac..5e47a4f48 100644 --- a/tests/visual/effects.all.js +++ b/tests/visual/effects.all.js @@ -1,5 +1,6 @@ $(function() { + var duration = 1000, wait = 500; $("div.effect") .hover(function() { $(this).addClass("hover"); }, @@ -13,15 +14,24 @@ $(function() { $(el).bind("click", function() { - $(this).addClass("current").hide(n, o, 1000, function() { + $(this).addClass("current").hide(n, o, duration, function() { var self = this; window.setTimeout(function() { - $(self).show(n, o, 1000, function() { $(this).removeClass("current"); }); - },500); + $(self).show(n, o, duration, function() { $(this).removeClass("current"); }); + }, wait); }); }); }; + + $("#hide").click(function() { + var el = $(this); + el.addClass("current").hide(duration, function() { + setTimeout(function() { + el.show(duration, function() { el.removeClass("current") }); + }, wait); + }) + }) effect("#blindHorizontally", "blind", { direction: "horizontal" }); effect("#blindVertically", "blind", { direction: "vertical" }); @@ -39,6 +49,8 @@ $(function() { effect("#explode9", "explode", {}); effect("#explode36", "explode", { pieces: 36 }); + effect("#fade", "fade", {}); + effect("#fold", "fold", { size: 50 }); effect("#highlight", "highlight", {}); @@ -61,7 +73,7 @@ $(function() { $(this).addClass(function() { window.console && console.log(arguments); return "current"; - }, 1000, function() { + }, duration, function() { $(this).removeClass("current"); }); }); @@ -69,12 +81,12 @@ $(function() { $(this).addClass("current").removeClass(function() { window.console && console.log(arguments); return "current" - }, 1000); + }, duration); }); $("#toggleClass").click(function() { $(this).toggleClass(function() { window.console && console.log(arguments); return "current" - }, 1000); + }, duration); }); }); |