How to use jquery to have hidden menu drop down at top of page?
I've seen this done before, but I'm not sure how.
When my 开发者_StackOverflowpage loads, I want a hidden section to drop down at the top of the page (probably around 100 pixels in height). Ideally, I'd like it to shift the entire page down as well (as opposed to appearing on top of the page). At the top corner of the secret area should be a 'Close' button, which when clicked causes the actual page to slide up and cover section.
I know there's a name for this, but I'm not sure what it is. I'm assuming it's jquery-related.
Can anyone point me in the right direction?
Lookup jquery show, it should work fine : http://docs.jquery.com/Effects/show
<div id="hiddenMenu" style="display:none"> bla bla bla </div>
<a href="#" onclick="$('hiddenMenu').show('slow'); return false;">show the hidden menu</a>
StackOverflow has it, and it's basically a <div>
that appears right after the opening <body>
tag. Simply style appropriately when you need to.
Well, there is a UI plugin called Dialog that I use alot. It is a pop-over though, but will show even if the user is scrolled down on the page.
精彩评论