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?
- <script type="text/javascript" >
- $(document).ready(function()
- {
- var $button = $("#contactLink");
- var $sidebar = $("#contact-container");
-
- $sidebar.animate({marginTop:'-=382px'},400);
- $button.toggle(
- function()
- {
- $sidebar.animate({marginTop:'0px'},400);
- $("#footer").css("overflow","hidden")
-
-
- },
- function()
- {
- $sidebar.animate({marginTop:'-=382px'},400);
- $("#footer").css("overflow","visible").delay(800);
- });
- });
- </script>