is it possible to append new class with some CSS rules to an element, for example a div, and add this class to style section?
For example, when user clicks on a button I want to add new class 'newClass' with CSS background-color: red for my div element, and append
.newClass{
background-color: red
}
to my <style>
section. Thanks for the help!