title: i want my sidebar stay open when refreshed
body: <p>I used the method bellow for opening and closing a tab by clicking the button using java script. </p>
  
  <p>here is the html:</p>
  
  <pre><code>&lt;div class="header_nav_icon" onclick="chartButton()" &gt;
      &lt;i class="fas fa-chart-pie"&gt;&lt;/i&gt;
  &lt;/div&gt;
  
  &lt;div id="chart_sidebar" &gt;
      &lt;a href="#"&gt;charts&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here is the css:</p>
  
  <pre><code>#chart_sidebar{
     display: none;
     top: 55;
     width: 340px;
     height: 100%;
     float:left;
  }
  </code></pre>
  
  <p>Here is the Javascript:</p>
  
  <pre><code>function chartButton() {
  
     var x = document.getElementById("chart_sidebar");
  
     if (x.style.display === "block") {
         x.style.display = "none";
     } else {
         x.style.display = "block";
     }
  
  }
  </code></pre>
  
  <p>When I click the tab, it opens but when I refreshed the page it revert back to its default setup. </p>
  
  <p>I want the browser remember the sidebar to stay open even it is refreshed.</p>