$.fn.slideFadeToggle = function(speed, easing, callback) { return this.animate({opacity: 'toggle', height: 'toggle'}, speed, easing, callback); }; Usage $("#something").click(function() { $(this).slideFadeToggle(); css tricks Tagged: 2015FadeSlide