I dynamically change the background color of a div with the jquery .css() method. I also want to have a CSS hover selector on that same div that ch
When you manipulate css with jQuery it adds it inline and overrides any css in a stylesheet try using jquery to add and remove a class that changes the color on hover. Here's the working fiddle: http://jsfiddle.net/KVmCt/6/
jQuery looks like this:
$("div").hover(
function(){
$(this).addClass("blue");
}
,
function(){
$(this).removeClass("blue");
});