summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/visual/effects.all.html18
-rw-r--r--tests/visual/effects.all.js20
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);
+ });
});