After searching through numerous posts and forums without success, I am in need of a solution to dynamically load and unload stylesheets for my website.
The website I am constructing has a main stylesheet along with 2 optional stylesheets that alter colors. I want to have 2 links that, when clicked, will load a new stylesheet that overrides some styles from the main sheet.
For instance:
My website is yellow, which most users prefer. However, I want to give them the choice to switch to red or blue by clicking on a link. The red stylesheet will then override the main styles and turn the website red; if they click blue, it changes to blue.
To make things more complex, if a user first selects red but then changes their mind and wants blue instead, I need the red stylesheet to be unloaded and only the blue loaded.
Since I am not very knowledgeable in javascript, I am struggling with this task. Any help would be greatly appreciated!