I really need to use some Javascript to make my site more user friendly, because right now, while simple, it’s horrendously cluttered. So far it’s programmed entirely in HTML as my Javascripting skills are almost nonexistent. I have some programming experience (enough to understand a few things), but not enough to write the code for this.
Here’s a basic set-up:
<html><head></head><body>
Category 1: <a href=”#”>+</a>/<a href=”#”>-</a>
<br><br>
<select name=”menu1″>
<option value=”1″>1</option>
<option value=”2″>2</option>
<option value=”3″>3</option>
</select>
<br><br>
<select name=”menu2″>
<option value=”1″>1</option>
<option value=”2″>2</option>
<option value=”3″>3</option>
</select>
</body></html>
Can someone PLEASE help me rewrite this so that both menus are hidden, and clicking on ‘ + ‘ makes menu1 visible, or menu2 if menu1 is already visible, and clicking on ‘ – ‘ makes menu2 hidden (or menu1 if menu2 is already hidden). Basically so that ‘ + ‘ makes them visible, top to bottom, and ‘ – ‘ hides them, bottom to top.
And can you please explain what the script is doing? [I need to do this for at least five menus in at least ten different categories, so I’ll need to be able to edit it, or at least copy and paste it]
Thank you so much!