1. jQuery SlideDown SlideUp

    May 10, 2010 by J.P.

    Here is an basic example on how to create a jQeury toggle using the slideDown and SlideUp functions.
    I prefer to use this instead of the toggle function for a smoother animation.

    View the example

    jQuery code used:
    $(document).ready(function() {
    $('#toggle_control').bind('click', function() {
    if ( $('#copy_toggle').is(':hidden') ) {
    $("#copy_toggle").slideDown('medium', function() {
    });
    }
    else{
    $("#copy_toggle").slideUp('medium', function() {
    // Animation complete.
    });
    }
    return false;
    });
    });