var el = $(this);
el.addClass("current").hide(duration, function() {
setTimeout(function() {
- el.show(duration, function() { el.removeClass("current") });
+ el.show(duration, function() { el.removeClass("current"); });
}, wait);
- })
- })
+ });
+ });
effect("#blindLeft", "blind", { direction: "left" });
effect("#blindUp", "blind", { direction: "up" });
effect("#puff", "puff", { times: 2 });
effect("#scale", "scale", {});
- effect("#size", "size", { from: { width: 300, height: 300 }});
+ effect("#size", "size", {});
+ $("#sizeToggle").bind("click", function() {
+ var opts = { to: { width: 300, height: 300 }};
+ $(this).addClass('current')
+ .toggle("size", opts, duration)
+ .delay(wait)
+ .toggle("size", opts, duration, function() {
+ $(this).removeClass("current");
+ });
+ });
$("#shake").bind("click", function() { $(this).addClass("current").effect("shake", {}, 100, function() { $(this).removeClass("current"); }); });
$("#removeClass").click(function() {
$(this).addClass("current").removeClass(function() {
window.console && console.log(arguments);
- return "current"
+ return "current";
}, duration);
});
$("#toggleClass").click(function() {
$(this).toggleClass(function() {
window.console && console.log(arguments);
- return "current"
+ return "current";
}, duration);
});
});