SlideUp and SlideDown problem in code with div
<p>I want to slideUp one div then change background color and then slideDown. I tried like this</p>

<pre><code>function show_hide_mode_parameters(color){
    var is_hidden=$('#mode_parameters').is(':hidden');
    if (!is_hidden){
        $('#mode_parameters').slideUp('fast', function() {});
    }
    $('#mode_parameters').css('background-color', color);
    $('#mode_parameters').slideDown('slow', function() {});

}
</code></pre>

<p>but what happen is when it starts to slideUp immediatelly change background color, like it doesn't execute commands sequantelly . Can someone tell what I make wrong ?</p>
