I have designed a custom cms theme with various customization options that I wish to showcase in a live demo. My goal is to implement Javascript style switchers or modifiers where users can choose values from checkboxes or select tags, and see their selections reflected on the HTML elements. For instance,
If we consider my page container:
<div id="container"> <!--PAGE GOES HERE --> </div>
When a user clicks on 'color scheme blue', I want the container to include the 'blue_theme' class like this:
<div id="container" class="blue_theme" > <!--PAGE GOES HERE --> </div>
Furthermore, I am curious if it is feasible to directly change CSS properties as shown below:
/* Base property */
#container{
background:red;
}
If a user selects 'color scheme blue', I aim to update the container's background to blue like this:
/* Base property */
#container{
background:blue;
}