title: how to add css when button clicked
body: <p>How do I add css when a button is clicked jquery?</p>
  
  <p>I want to create when I click the button it will toggle hide my div and rotate the arrow to 90 degree and when a click again it will toggle show my div and rotate the arrow to -90 degree.</p>
  
  <p>Here's what I've tried:</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>$("#toogle_menu").click(function() {
    $("#jy_nav_pos_main").slideToggle("slow"),
      $("#toogle_menu").css({
        transform: "rotate(-90deg)"
      });
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;ul class="nav nav-tabs row margin_auto" id="jy_nav_pos_main" role="tablist"&gt;
    &lt;li&gt;menu&lt;/li&gt;
  &lt;/ul&gt;
  &lt;button id="toogle_menu" class="btn btn-light"&gt;
      &amp;raquo;
  &lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>