I have a site that requires two themes to be loaded. The second theme can be toggled on/off by the user. I'm currently accomplishing this by using the disabled
tag in the link like so:
<link rel="stylesheet" href="{{main css}}">
<link rel="stylesheet" title="theme-white" href="{{2nd theme css}}" disabled>
I then toggle disabled
in JavaScript.
This works great in Safari (Mac), Chrome (Mac/Windows), and IE10. However, Firefox (both Mac and Windows) seems to ignore the disabled
tag on page load and displays the second theme on initial load (as it is loaded second). When I manually toggle disabled
, however, Firefox does respond to the tag and will begin to switch the second theme on/off.
How can I accomplish this goal?