$.fn.slideFadeToggle = function(speed, easing, callback) { return this.animate({opacity: ‘toggle’, height: ‘toggle’}, speed, easing, callback); }; Usage $(“#something”).click(function() { $(this).slideFadeToggle(); css tricks
Articles Tagged: Slide
Slide Functions
// toggle slide up and down $(“#DivID”).slideToggle(1000); // do something when animation complete $(“#DivID”).slideToggle(1000, function () { alert(“Slide Toggle Complete”); }); // slide up $(“#DivID”).slideUp(1000); // do something when animation is complete $(“#DivID”).slideUp(1000, function () { alert(“Slide Up Complete”); }); // slide down $(“#DivID”).slideDown(1000); // do something when animation is complete $(“#DivID”).slideDown(1000, function () { […]