delay().css()??

delay().css()??

I have another post, that has the same question that pertains to a larger scope. I decided to post here, as this is a specific sneario that others may find useful.

Is it possible to apply the delay function to the css()?


So basically the set up is to make the <div id="footer"> overflow set to hidden, but when you toggle it set it to visible, and upon the toggle animate it down, delay and set the overflow back to hidden?
  1. <script type="text/javascript" >
  2. $(document).ready(function()
  3. {
  4.     var $button = $("#contactLink");
  5.     var $sidebar = $("#contact-container");
  6.    
  7.     $sidebar.animate({marginTop:'-=382px'},400);
  8.     $button.toggle(
  9.                    function()
  10.                    {
  11.                       $sidebar.animate({marginTop:'0px'},400);
  12.                     $("#footer").css("overflow","hidden")
  13.                                          
  14.    
  15.                    },
  16.                    function()
  17.                    {
  18.                        $sidebar.animate({marginTop:'-=382px'},400);
  19.                        $("#footer").css("overflow","visible").delay(800);
  20.                    });
  21. });
  22. </script>