How can I make a custom animation?
$('button').toggle(function() {
anim.go("fadeOut slow", $("mydiv"));
}, function() {
anim.go("fadeIn slow", $("mydiv"));
});
Toggle is working, but first appears toggle animation, then mine. How can I disable default toggle anim? Like toggle(0) P.S I've tried to add 0 to my code, but then second function isn't working. Any ideas?
toggle()no longer works in the manner you've used. You'll need to useclick()and then check the visibility state of the element and then run the required animationif($("mydiv").is(":visible")) {works perfectly!