aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Worth <rdworth@gmail.com>2008-06-09 12:19:59 +0000
committerRichard Worth <rdworth@gmail.com>2008-06-09 12:19:59 +0000
commitcecc4838a28b07a2bbff0e9daed1b3da80cfaa04 (patch)
tree1106ceab2937ba14e2325a7fc381a85bf6c47ba7
parent6e4092f986d3bc9e8f0bacc4d68707f190fa723e (diff)
downloadjquery-ui-cecc4838a28b07a2bbff0e9daed1b3da80cfaa04.tar.gz
jquery-ui-cecc4838a28b07a2bbff0e9daed1b3da80cfaa04.zip
Added effects visual test pages
-rw-r--r--tests/visual/effects.all.css49
-rw-r--r--tests/visual/effects.all.html165
-rw-r--r--tests/visual/effects.all.js65
3 files changed, 279 insertions, 0 deletions
diff --git a/tests/visual/effects.all.css b/tests/visual/effects.all.css
new file mode 100644
index 000000000..587c64696
--- /dev/null
+++ b/tests/visual/effects.all.css
@@ -0,0 +1,49 @@
+body,html {
+ margin: 0;
+ padding: 0;
+ font-size: 12px;
+ font-family: Arial;
+ background: #000;
+}
+
+ul.effects {
+ margin: 0;
+ padding: 0;
+}
+
+ul.effects li {
+ margin: 0;
+ padding: 0;
+ width: 120px;
+ height: 100px;
+ float: left;
+ margin-top: 20px;
+ margin-left: 20px;
+}
+
+div.effect {
+ width: 120px;
+ height: 100px;
+ background: #333;
+ border: 5px outset #aaa;
+ float: left;
+ cursor: pointer;
+ cursor: hand;
+}
+
+div.current {
+ border: 5px outset #FF0000;
+ background: #660000;
+}
+
+div.effect p {
+ color: #eee;
+ margin: 0px;
+ padding: 10px;
+}
+
+.ui-effects-transfer {
+ border: 1px dotted #fff;
+ background: #666;
+ opacity: 0.5;
+} \ No newline at end of file
diff --git a/tests/visual/effects.all.html b/tests/visual/effects.all.html
new file mode 100644
index 000000000..2664a3a61
--- /dev/null
+++ b/tests/visual/effects.all.html
@@ -0,0 +1,165 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+ <title>Effects Test Suite</title>
+ <link rel="stylesheet" href="effects.all.css" type="text/css" media="screen" title="no title" charset="utf-8" />
+
+ <script type="text/javascript" src="../../jquery-1.2.6.js"></script>
+ <script type="text/javascript" src="../../ui/effects.core.js"></script>
+
+ <script type="text/javascript" src="../../ui/effects.blind.js"></script>
+ <script type="text/javascript" src="../../ui/effects.bounce.js"></script>
+ <script type="text/javascript" src="../../ui/effects.clip.js"></script>
+ <script type="text/javascript" src="../../ui/effects.drop.js"></script>
+ <script type="text/javascript" src="../../ui/effects.explode.js"></script>
+ <script type="text/javascript" src="../../ui/effects.fold.js"></script>
+ <script type="text/javascript" src="../../ui/effects.highlight.js"></script>
+ <script type="text/javascript" src="../../ui/effects.pulsate.js"></script>
+ <script type="text/javascript" src="../../ui/effects.scale.js"></script>
+ <script type="text/javascript" src="../../ui/effects.shake.js"></script>
+ <script type="text/javascript" src="../../ui/effects.slide.js"></script>
+ <script type="text/javascript" src="../../ui/effects.transfer.js"></script>
+
+ <script type="text/javascript" src="effects.all.js"></script>
+</head>
+<body>
+
+<ul class="effects">
+
+ <li>
+ <div class="effect" id="blindHorizontally">
+ <p>Blind horizontally</p>
+ </div>
+ </li>
+
+ <li>
+ <div class="effect" id="blindVertically">
+ <p>Blind vertically</p>
+ </div>
+ </li>
+
+ <li>
+ <div class="effect" id="bounce3times">
+ <p>Bounce 3 times</p>
+ </div>
+ </li>
+
+ <li>
+ <div class="effect" id="clipHorizontally">
+ <p>Clip horizontally</p>
+ </div>
+ </li>
+
+ <li>
+ <div class="effect" id="clipVertically">
+ <p>Clip vertically</p>
+ </div>
+ </li>
+
+ <li>
+ <div class="effect" id="dropDown">
+ <p>Drop down</p>
+ </div>
+ </li>
+
+ <li>
+ <div class="effect" id="dropUp">
+ <p>Drop up</p>
+ </div>
+ </li>
+
+ <li>
+ <div class="effect" id="dropLeft">
+ <p>Drop left</p>
+ </div>
+ </li>
+
+ <li>
+ <div class="effect" id="dropRight">
+ <p>Drop right</p>
+ </div>
+ </li>
+
+ <li>
+ <div class="effect" id="explode9">
+ <p>Explode in 9 pieces</p>
+ </div>
+ </li>
+
+ <li>
+ <div class="effect" id="explode36">
+ <p>Explode in 36 pieces</p>
+ </div>
+ </li>
+
+ <li>
+ <div class="effect" id="fold">
+ <p>Fold</p>
+ </div>
+ </li>
+
+ <li>
+ <div class="effect" id="highlight">
+ <p>Highlight</p>
+ </div>
+ </li>
+
+ <li>
+ <div class="effect" id="pulsate">
+ <p>Pulsate 2 times</p>
+ </div>
+ </li>
+
+ <li>
+ <div class="effect" id="puff">
+ <p>Puff</p>
+ </div>
+ </li>
+
+ <li>
+ <div class="effect" id="scale">
+ <p>Scale</p>
+ </div>
+ </li>
+
+ <li>
+ <div class="effect" id="shake">
+ <p>Shake</p>
+ </div>
+ </li>
+
+ <li>
+ <div class="effect" id="slideDown">
+ <p>Slide down</p>
+ </div>
+ </li>
+
+ <li>
+ <div class="effect" id="slideUp">
+ <p>Slide up</p>
+ </div>
+ </li>
+
+ <li>
+ <div class="effect" id="slideLeft">
+ <p>Slide left</p>
+ </div>
+ </li>
+
+ <li>
+ <div class="effect" id="slideRight">
+ <p>Slide right</p>
+ </div>
+ </li>
+
+ <li>
+ <div class="effect" id="transfer">
+ <p>Transfer to first element</p>
+ </div>
+ </li>
+
+</ul>
+
+</body>
+</html>
diff --git a/tests/visual/effects.all.js b/tests/visual/effects.all.js
new file mode 100644
index 000000000..ebf0ad082
--- /dev/null
+++ b/tests/visual/effects.all.js
@@ -0,0 +1,65 @@
+$(document).ready(function() {
+
+ $("div.effect")
+ .hover(function() {
+ $(this).addClass("hover");
+ }, function() {
+ $(this).removeClass("hover");
+ })
+ ;
+
+
+ var effect = function(el, n, o) {
+
+ $.extend(o, {
+ easing: "easeOutQuint"
+ });
+
+ $(el).bind("click", function() {
+
+ $(this).addClass("current").hide(n, o, 1000, function() {
+ var self = this;
+ window.setTimeout(function() {
+ $(self).show(n, o, 1000, function() { $(this).removeClass("current"); });
+ },500);
+ });
+ });
+
+ };
+
+
+ effect("#blindHorizontally", "blind", { direction: "horizontal" });
+ effect("#blindVertically", "blind", { direction: "vertical" });
+
+ effect("#bounce3times", "bounce", { times: 3 });
+
+ effect("#clipHorizontally", "clip", { direction: "horizontal" });
+ effect("#clipVertically", "clip", { direction: "vertical" });
+
+ effect("#dropDown", "drop", { direction: "down" });
+ effect("#dropUp", "drop", { direction: "up" });
+ effect("#dropLeft", "drop", { direction: "left" });
+ effect("#dropRight", "drop", { direction: "right" });
+
+ effect("#explode9", "explode", { });
+ effect("#explode36", "explode", { pieces: 36 });
+
+ effect("#fold", "fold", { size: 50 });
+
+ effect("#highlight", "highlight", { });
+
+ effect("#pulsate", "pulsate", { times: 2 });
+
+ effect("#puff", "puff", { times: 2 });
+ effect("#scale", "scale", { });
+
+ $("#shake").bind("click", function() { $(this).addClass("current").effect("shake", {}, 100, function() { $(this).removeClass("current"); }); });
+
+ effect("#slideDown", "slide", { direction: "down" });
+ effect("#slideUp", "slide", { direction: "up" });
+ effect("#slideLeft", "slide", { direction: "left" });
+ effect("#slideRight", "slide", { direction: "right" });
+
+ $("#transfer").bind("click", function() { $(this).addClass("current").effect("transfer", { to: "div:eq(0)" }, 1000, function() { $(this).removeClass("current"); }); });
+
+}); \ No newline at end of file