]> source.dussan.org Git - jquery-ui.git/commitdiff
New "All effects" page modeled after the visual tests. Changed so script is in the...
authorTodd Parker <fg.todd@gmail.com>
Wed, 28 Jan 2009 16:24:36 +0000 (16:24 +0000)
committerTodd Parker <fg.todd@gmail.com>
Wed, 28 Jan 2009 16:24:36 +0000 (16:24 +0000)
demos/effect_types/all_effects.html [new file with mode: 0644]

diff --git a/demos/effect_types/all_effects.html b/demos/effect_types/all_effects.html
new file mode 100644 (file)
index 0000000..01b8472
--- /dev/null
@@ -0,0 +1,222 @@
+<!doctype html>
+<html lang="en">
+<head>
+       <title>jQuery UI Effects Test Suite</title>
+       <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
+       <link type="text/css" href="../demos.css" rel="stylesheet" />
+       <script type="text/javascript" src="../../jquery-1.3.1.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">
+       
+               $(function() {
+               
+                       $("li div")
+                               .hover(function() { $(this).addClass("ui-state-hover"); },
+                                       function() { $(this).removeClass("ui-state-hover"); });
+                                        var effect = function(el, n, o) {
+                                               $.extend(o, {
+                                       easing: "easeOutQuint"
+                               });
+               
+                               $(el).bind("click", function() {
+               
+                                       $(this).hide(n, o, 1000, function() {
+                                               var self = this;
+                                               window.setTimeout(function() {
+                                                       $(self).show(n, o, 1000);
+                                               },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"); }); });
+               });
+       </script>
+       
+       <style>
+       li  { height:70px; width:80px; float:left; list-style:none; margin:5px; }
+       li div { height:56px; width:66px;  padding:7px; }
+       li div p strong { display:block; font-size:110%; margin-bottom:2px; } 
+       .ui-effects-transfer {
+               border: 1px dotted #fff;
+               background: #666;
+               opacity: 0.25;
+       }
+       </style>
+       
+</head>
+<body>
+
+<ul class="effects">
+
+       <li>
+               <div class="ui-state-default ui-corner-all" id="blindHorizontally">
+                       <p><strong>Blind</strong>horizontally</p>
+               </div>
+       </li>
+
+       <li>
+               <div class="ui-state-default ui-corner-all" id="blindVertically">
+                       <p><strong>Blind</strong> vertically</p>
+               </div>
+       </li>
+
+       <li>
+               <div class="ui-state-default ui-corner-all" id="bounce3times">
+               <p><strong>Bounce</strong> 3 times</p>
+               </div>
+       </li>
+
+       <li>
+               <div class="ui-state-default ui-corner-all" id="clipHorizontally">
+               <p><strong>Clip</strong> horizontally</p>
+               </div>
+       </li>
+
+       <li>
+               <div class="ui-state-default ui-corner-all" id="clipVertically">
+               <p><strong>Clip</strong> vertically</p>
+               </div>
+       </li>
+
+       <li>
+               <div class="ui-state-default ui-corner-all" id="dropDown">
+               <p><strong>Drop</strong> down</p>
+               </div>
+       </li>
+
+       <li>
+               <div class="ui-state-default ui-corner-all" id="dropUp">
+               <p><strong>Drop</strong> up</p>
+               </div>
+       </li>
+
+       <li>
+               <div class="ui-state-default ui-corner-all" id="dropLeft">
+               <p><strong>Drop</strong> left</p>
+               </div>
+       </li>
+
+       <li>
+               <div class="ui-state-default ui-corner-all" id="dropRight">
+               <p><strong>Drop</strong> right</p>
+               </div>
+       </li>
+
+       <li>
+               <div class="ui-state-default ui-corner-all" id="explode9">
+               <p><strong>Explode</strong> in 9 pieces</p>
+               </div>
+       </li>
+
+       <li>
+               <div class="ui-state-default ui-corner-all" id="explode36">
+               <p><strong>Explode</strong> in 36 pieces</p>
+               </div>
+       </li>
+
+       <li>
+               <div class="ui-state-default ui-corner-all" id="fold">
+               <p><strong>Fold</strong></p>
+               </div>
+       </li>
+
+       <li>
+               <div class="ui-state-default ui-corner-all" id="highlight">
+               <p><strong>Highlight</strong></p>
+               </div>
+       </li>
+
+       <li>
+               <div class="ui-state-default ui-corner-all" id="pulsate">
+               <p><strong>Pulsate</strong> 2 times</p>
+               </div>
+       </li>
+
+       <li>
+               <div class="ui-state-default ui-corner-all" id="puff">
+               <p><strong>Puff</strong></p>
+               </div>
+       </li>
+
+       <li>
+               <div class="ui-state-default ui-corner-all" id="scale">
+               <p><strong>Scale</strong></p>
+               </div>
+       </li>
+
+       <li>
+               <div class="ui-state-default ui-corner-all" id="shake">
+               <p><strong>Shake</strong></p>
+               </div>
+       </li>
+
+       <li>
+               <div class="ui-state-default ui-corner-all" id="slideDown">
+               <p><strong>Slide</strong> down</p>
+               </div>
+       </li>
+
+       <li>
+               <div class="ui-state-default ui-corner-all" id="slideUp">
+               <p><strong>Slide</strong> up</p>
+               </div>
+       </li>
+
+       <li>
+               <div class="ui-state-default ui-corner-all" id="slideLeft">
+               <p><strong>Slide</strong> left</p>
+               </div>
+       </li>
+
+       <li>
+               <div class="ui-state-default ui-corner-all" id="slideRight">
+               <p><strong>Slide</strong> right</p>
+               </div>
+       </li>
+
+       <li>
+               <div class="ui-state-default ui-corner-all" id="transfer">
+               <p><strong>Transfer</strong> to 1st element</p>
+               </div>
+       </li>
+
+</ul>
+
+</body>
+</html>