I have 2 tabs at the top of a page. When one tab is clicked, I would like that tab to have an \"active\" class and the other tab to have an \"inactive\" class so that the us
here's a solution that doesn't use any jQuery! it does assume there is only 2 tabs thought.
http://jsfiddle.net/nYpV3/
Option 1 Option 2 function setToActive(me, otherId){ me.className='active'; document.getElementById(otherId).className='inactive'; }