I am trying to set a divs background color via
var color = "#FF0000";
$('#main_con开发者_开发知识库tent_bg').css('background-color', color);
This works everywhere except IE (I have 8 installed);
The only thing I can think of is that I need to cast the color value to a number somehow.
Does anyone know why this wouldn't work?
thanks
Why Dont you try with
$('#main_content_bg').addClass("The Class that set color");
精彩评论