CSS and JavaScript
CSS and JavaScript
Out of context: Reply #10
- Started
- Last post
- 11 Responses
- seed0
I have a main nav and a sub nav below, both horizontal. I used javascript so that when you click the main nav it changes to a 'currently on' state and shows one of the 5 subnavs that are hidden. So it looks like tabs with the main nav button that was selected shown as the same color as the subnav. All without refreshing the page. The main nav tab stays in its 'on' state until another is selected. I will post a screen or some code tomorrow if I get a chance.
I am really just curious why a hover state won't work once you alter the bg color with JS.