+ 8
How to add or remove style of an element?
Please Explain.
2 Answers
+ 4
Just like this.
To set
document.getElementById(element Id).style.color = colorName;
To remove
document.getElementById(element Id).style.color = '';
By using javascript :-
https://www.w3schools.com/jsref/prop_html_style.asp
By using jQuery:-
https://www.w3schools.com/jquery/jquery_css.asp