Javascript Menu Highlight Switcher

yyahmee

New Member
i'm trying to create a page which is just a single page with different divs which are hidden when not selected.Currently i'm having some problem with the menu buttons, i want the selected page to be highlighted, then when another tab is selected, the other tab is highlighted instead.SayHome, About Us, Contact UsSo if its in the home div, Home tab is highlighted, but if its the about us div, the about us is highlighted. I wanted to use pure css but after searching there wasn't any results so i'll have to stick with javascript.This is my code\[code\]function Switcher(a,b,c,d,e){document.getElementById('button1').style.background=a;document.getElementById('button2').style.background=b;document.getElementById('button3').style.background=c;document.getElementById('button4').style.background=d;document.getElementById('button5').style.background=e;}\[/code\]with an OnClick function\[code\]onClick="Switcher(#c5e043,#241009,#241009,#241009,#241009)"\[/code\]but it doesn't seem to work, any help? Or other simpler suggestions :) ?
 
Back
Top