PSD to HTML conversion PSD to HTML conversion PSD2HTML.com with over 300 professionals takes the designs to HTML and beyond

Code Snippet

Home » Code Snippets » jQuery » Combine Slide and Fade Functions

Combine Slide and Fade Functions

$.fn.slideFadeToggle  = function(speed, easing, callback) {
        return this.animate({opacity: 'toggle', height: 'toggle'}, speed, easing, callback);
}; 

Usage

$("#something").click(function() {
   $(this).slideFadeToggle();
});

Subscribe to The Thread

  1. As if you read my thoughts. Thanks Chris :D

  2. This is beautiful! I can imagine using this effect on many things.

    Thanks!

  3. Any demo? I would like to see it if there is some.

  4. Steviss

    Thanks, m8! Your site is great! Found a lot of usefull tips!

  5. El garch Hicham

    Hello, is there any Demo to download, it doesn’t work for me.
    thx for the nice post.

Speak, my friend

At this moment, you have an awesome opportunity* to be the person your mother always wanted you to be: kind, helpful, and smart. Do that, and we'll give you a big ol' gold star for the day (literally).

Posting tips:
  • You can use basic HTML
  • When posting code, please turn all
    < characters into &lt;
  • If the code is multi-line, use
    <pre><code></code></pre>
Thank you,
~ The Management ~