/    Sign up×
Community /Pin to ProfileBookmark

Javascript menu

I want to create a vertical menu system that, when I click on a category, will display images underneath that I’ve made in the style of my site, kind of like this:

News
Projects
Ideas Foundry
Links

user clicks on Projects and the menu looks like this

News
Projects
|Project 1
|Project 2
|Project 3
Ideas Foundry
Links

I was looking at some of the DHTML/javascript menus. While these are definitely cool, they’re not quite what I want. I really want to display my own images, but have them have the behavior normally associated with a dynamic DHTML menu.

If anyone can point me in the right direction here, I’d be eternally grateful. Thanks!

Geuis

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@gil_davisApr 17.2003 — I would think that the technique (basically display="none" changes to display="block") doesn't care whether you use an image or text inside the DIV used for the menu.

Or is there more to your question than is apparent?
Copy linkTweet thisAlerts:
@tim_gorApr 17.2003 — Hm... I would imagine you could do something like this (though I can't code it for you coz it'll take too long)

<div id="MyMenu">

</div>

Then followed by some script which basically generates the HTML to go inside the DIV tag using MyMenu.innerHTML = "..."

So basically you dynamically update what's inside MyMenu according to some set of variables. And then these variables are updated when you click on a menu item?
×

Success!

Help @geuis 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 6.1,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

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