javascript - How can I remove a style added with .css() function?

Опубликовано: 04 Апрель 2024
на канале: Code Samples
43
1

I'm changing 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 the 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.


Смотрите видео javascript - How can I remove a style added with .css() function? онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Code Samples 04 Апрель 2024, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 43 раз и оно понравилось 1 людям.