title: Toggle CSS Sheets (on click) with Javascript
body: <p>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:</p>
  
  <p>Set Up:</p>
  
  <pre><code>&lt;link id="style1" rel="stylesheet" type="text/css" href="resumecss.css" /&gt;
  &lt;script type="text/javascript"&gt;
  function toggle() {
      var el = document.getElementById("style1");
      if (el.href == "resumecss.css") {
          el.href = "resumecssinvert.css";    
      }
      else {
          el.href = "resumecss.css";  
      }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>Calling:</p>
  
  <pre><code>&lt;button type="button" onclick="toggle()"&gt;Switch&lt;/button&gt;
  </code></pre>
  
  <p>The purpose being to flip between two skins on one page repeatably.</p>
  
  <p>Thanks in advance to those of you kind/knowledgeable to help.</p>