Suppose I have 3 completely different layouts for one site.
The first is shown by default, but there are hyperlinks at the top of the page. If you click one of them, I want the current stylesheet to be no longer used and the clicked one becomes applied to the HTML document.
I’m thinking this is done with Javascript, but can someone show me exactly how?
This article should answer your question. It relies on setting a stylesheet as a default one, then switching this out with alternate stylesheets, using the
'alternate stylesheet'as therelattribute instead of simply'stylesheet', along with a bit of Javascript.