title: Jquery toggle sidebar with 2 buttons
body: <p>I am trying to create a toggle on a sidebar so that the toggle button opens the sidebar. This works great on desktop, however, if I am using mobile, the toggle button gets hidden. Is it possible to add a close button in the sidebar which can close the sidebar without breaking the script? The script I have is:</p>
  
  <pre><code>&lt;div id="sidebar"&gt;content&lt;/div&gt;
  &lt;div id="filter-icon"&gt;Refine Selection &lt;div id="filterswitch"&gt;&lt;/div&gt;&lt;/div&gt;
  </code></pre>
  
  <pre><code>&lt;script&gt;
  jQuery(document).ready(function() {
      jQuery("#filter-icon").click(function() {
          jQuery("#filterswitch").toggleClass('active');
          jQuery("#sidebar").toggleClass('show-sidebar');
      });
  });
  &lt;/script&gt;
  </code></pre>