Skip to content
Permalink
Browse files

added class animations (including 1.4 style callbacks) to visual effe…

…cts test page
  • Loading branch information
jzaefferer committed Jan 21, 2010
1 parent f37da0e commit 568b607b81cf7d98826a890246d1ff799962687c
Showing with 38 additions and 0 deletions.
  1. +18 −0 tests/visual/effects.all.html
  2. +20 −0 tests/visual/effects.all.js
@@ -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>

@@ -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);
});
});

0 comments on commit 568b607

Please sign in to comment.
You can’t perform that action at this time.