title: Saving a toggled class Div (with local storage)
body: <p>So I have an example of a basic classtoggle with a <code>div</code> but can I make it so the "active <code>class</code>" can stay switched with a refresh/re-open. Could this be done?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function myfunc(div) {
    var className = div.getAttribute("class");
    if(className=="normal") {
      div.className = "active";
    }
    else{
      div.className = "normal";
    }
  }</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.normal /*Default*/
  {width:25%; height:25%; background: #ffeb00;}
  
  .active /*Switch*/
  {width:25%; height:25%; background: #ff00e2;}</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Test&lt;/title&gt;
          &lt;link rel = "stylesheet" type = "text/css" href = "style.css" /&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div id="div" class="normal" onclick="myfunc(this)"&gt;&lt;/div&gt;
          &lt;script src=".jquery-3.2.1.min.js"&gt;&lt;/script&gt;
          &lt;script src="script.js"&gt;&lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Thank You for all future Answers.</p>