I have this simple problem that I keep running into. Now I always use the same solution but I guess it is not the right way of doing it.
Here is the case:
If have a page with 6 links and 6 tabs. Each link shows or hide a tab with javascript (display:block/none). I run into the problem that the normal html/css way doesn't work. I can set my css to make a link hover, but things like active, etc. don't work. Now i use 6 separate functions to manipulate the style of each link so that when people click link 5, link 5 is underlined and the rest not.
I already tried to refactor my code by using .this and obj. but this still doesn't give the behavior I want. It seems that the css doesn't work anymore once you change the css with js.
I can't imagine that this is the correct way to achieve the normal html link behavior?
Does anybody have ideas? How do you fix this problem? This becomes a real problem for my newer projects where all the content is automatically generated.