I have a site where content creation is dynamic and the user can choose the color to be used in components, but I need it to see the update in real time, so I need the class to be changed with the required value and that the added elements also win this change.
I have a class in my CSS as follows:
<style type="text/css">
.color
{
background: red;
}
</style>
How do I change the background
of this class dynamically so that all elements receive the new value of background
and the next elements to be created already come with this element?