I currently have a set of divs (buttons) that all hover various colors using css. When one of this divs is pressed, I used jQuery to make the color permanent and reverted the color of all other divs back to default.
However, it seems that once this is done, the :hover color doesn’t work anymore. Am I approaching the jQuery wrong? How can I fix this. Here is an example:
EDIT
I am posting a jsfiddle to better explain. You will see that when you first scan your mouse across the divs, they hover different colors. And if you click either div 1 or div 2 (the others won’t work, didn’t bother doing the jQuery code for the fiddle for all of them), the div keeps it’s color and any other one reverts to original. HOWEVER, this then disables the :hover pseudo class I have in my CSS. I need help fixing this.
http://jsfiddle.net/P3Ckk/143/
What is the best solution to this?
Working Demo: http://jsfiddle.net/P3Ckk/145/
I would rather do this way:
HTML
CSS
JavaScript
Working Demo: http://jsfiddle.net/P3Ckk/145/