/    Sign up×
Community /Pin to ProfileBookmark

Pop Down Menu

Hi all,

I was hoping you could help me with a simple javascript menu i’m creating.

I’m trying to create a pull down menu similar to the one next to the search button at:

[url]http://office.microsoft.com/en-us/default.aspx[/url]

i want to have it so if you click on a down button a sub-menu will appear. and i want the sub menu to remain visible even if you “hover off” the menu. i want the menu to only disappear if you click oustide the menu.

Should i start with code like on this website?:

[url]http://zemuweb.com/dump/expandablemenu/#[/url]

Thank you in advance,

Celeste!

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@Celeste_authorOct 13.2007 — There is one small thing i forgot to mention that i want the menu to do. How do you make it so if you click on the the down button, after the menu has already appeared, it makes the menu disappear again?

Thank You,

Celeste
Copy linkTweet thisAlerts:
@scragarOct 13.2007 — position the menu where you want it, then give it a default style of invisible(I use "display: none", but there's one using "visibility: invisible", or something similar, never used that method much).

then make your button, give it an onclick to show the menu if hidden, or hide it otherwise.

possibly then give an onclick to the whole body to hide it.

I've not tried this, but if you give it a go I'll be happy to look over anything you produce and help you edit/fix it. ?
×

Success!

Help @Celeste_ spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...