I am currently exploring various methods to toggle between different style sheets on a webpage without the need to comment out multiple lines of code, as nesting comments in CSS is not an option.
Background: My goal is to experiment with the effects of different CSS styles and make the user experience WYSIWYG (What You See Is What You Get) for non-developers. So far, the only solution I have come across can be found here:
<a href="javascript:var%20i=0;if(document.styleSheets.length>0)
{cs=!document.styleSheets[0].disabled;
for(i=0;i<document.styleSheets.length;i++)
%20document.styleSheets[i].disabled=cs;};
void(cs=true);">Toggle stylesheet</a>
I am open to implementing solutions using HTML, JS, Java, jQuery, or CSS.
CLARIFICATION: Can we use JQuery to select style sheets? It seems feasible if they are selectable.
If you are closing this post, please provide feedback on how I can meet your requirements instead of simply shutting it down. Closing the post redirects me to the FAQ page without any input on improvements. Additionally, other users are responding according to my notifications, but since the post is closed by the time I return, I cannot view their answers properly due to limited notifications information.