You have not defined what you mean by "hover", but if you are talking about CSS :hover , it is because the inline styles (set by .css() override the styles of styles.
You can add !important to your CSS definition to override the inline string.
.bar:hover { color: #ABCDEF !important; }
I do not believe this works with older IE.
DEMO: http://jsfiddle.net/hh4NJ/1/
Another (and possibly better) solution would be to use .addClass() instead of .css() to change the style. Then you can take care of all this in your CSS (except for adding / removing a course class).
$('.bar').addClass('whiteColor');
.whiteColor { color:#fff; }
DEMO: http://jsfiddle.net/hh4NJ/2/
As for your update, you cannot use pseudo selectors such as :hover to select the DOM.
user1106925
source share