Trying to find code for switching between two style sheets with just one button. I've tried to adapt others' solutions, but to no avail (yet). Here's my most recent attempt:
Set Up:
<link id="style1" rel="stylesheet" type="text/css" href="resumecss.css" />
<script type="text/javascript">
function toggle() {
var el = document.getElementById("style1");
if (el.href == "resumecss.css") {
el.href = "resumecssinvert.css";
}
else {
el.href = "resumecss.css";
}
}
</script>
Calling:
<button type="button" onclick="toggle()">Switch</button>
The purpose being to flip between two skins on one page repeatably.
Thanks in advance to those of you kind/knowledgeable to help.