diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2010-01-21 17:32:52 +0000 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2010-01-21 17:32:52 +0000 |
commit | 568b607b81cf7d98826a890246d1ff799962687c (patch) | |
tree | 04f6383f52dc92fd79f6379551658e3a991ed8c3 /tests | |
parent | f37da0e6ce09615060f4562fe6fbc0361daf6772 (diff) | |
download | jquery-ui-568b607b81cf7d98826a890246d1ff799962687c.tar.gz jquery-ui-568b607b81cf7d98826a890246d1ff799962687c.zip |
added class animations (including 1.4 style callbacks) to visual effects test page
Diffstat (limited to 'tests')
-rw-r--r-- | tests/visual/effects.all.html | 18 | ||||
-rw-r--r-- | tests/visual/effects.all.js | 20 |
2 files changed, 38 insertions, 0 deletions
diff --git a/tests/visual/effects.all.html b/tests/visual/effects.all.html index 6190f479a..e2f67e2ad 100644 --- a/tests/visual/effects.all.html +++ b/tests/visual/effects.all.html @@ -154,6 +154,24 @@ <p>Transfer to first element</p> </div> </li> + + <li> + <div class="effect" id="addClass"> + <p>addClass</p> + </div> + </li> + + <li> + <div class="effect" id="removeClass"> + <p>removeClass</p> + </div> + </li> + + <li> + <div class="effect" id="toggleClass"> + <p>toggleClass</p> + </div> + </li> </ul> diff --git a/tests/visual/effects.all.js b/tests/visual/effects.all.js index 15386b5d8..0479c47ac 100644 --- a/tests/visual/effects.all.js +++ b/tests/visual/effects.all.js @@ -57,4 +57,24 @@ $(function() { $("#transfer").bind("click", function() { $(this).addClass("current").effect("transfer", { to: "div:eq(0)" }, 1000, function() { $(this).removeClass("current"); }); }); + $("#addClass").click(function() { + $(this).addClass(function() { + window.console && console.log(arguments); + return "current"; + }, 1000, function() { + $(this).removeClass("current"); + }); + }); + $("#removeClass").click(function() { + $(this).addClass("current").removeClass(function() { + window.console && console.log(arguments); + return "current" + }, 1000); + }); + $("#toggleClass").click(function() { + $(this).toggleClass(function() { + window.console && console.log(arguments); + return "current" + }, 1000); + }); }); |