Is there a way to update the :root css
variable using jquery
?
:root {
--color: #E72D2D;
}
.box-icon {
background-color: var(--color);
}
I tried but it doesn't seem to work
$("#blueColor").click(function(e) {
$(":root").css("--color", "#137581");
}