views:

36

answers:

1

Hi

So I'm changing the css with jquery and I wish to remove the styling I'm adding based on the input value:

if(color != '000000') $("body").css("background-color", color); else // remove style ?

how can I do this? Note that the line above runs whenever a color is selected using a color picker (ie. when mouse moves over a color wheel).

2nd note: I can't do this with css("background-color", "none") because it will remove the default styling from the css files. I just want to remove the background-color inline style added by jquery.

+2  A: 

I can't test it right now, but have you tried

css("background-color", "")

?

Pekka
yes seems to work :D thanks!
Alex