Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Aperture

macrumors 68000
Original poster
Mar 19, 2006
1,876
0
PA
I'm trying to accomplish a certain effect that I've seen done on other websites a bunch of times. Whenever the page loads, I'd like to have Div 2 physically (and animated) slide down the page, revealing a hidden menu of sorts, hidden behind it. Here is a diagram to help explain...

Do I need to help clarify? Does anyone have any suggestions?

sites.png
 
Initial CSS:
Code:
#mydiv2 {
display:hidden;
width:100px; /*whatever you want*/
height:100px; /*Again whatever you want*/
}

Jquery:
Code:
$(function() { 
    $("#mydiv2").slideDown("slow");
  });


HTML
Code:
<div id="mydiv2">
     Put your content here
</div>

You could also use show, which give a more slideDown/slide Accross function. Or use it in conjunction with setTimeout, where you could make it slide down, say 1 second, after the page loads.

Jquery rocks.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.