title: Add class then remove class when click
body: <p>I have an anchor text that when click adds an active class to another class. I want to remove it when it has an active class or if I click the anchor text again. How can I do that? </p>
  
  <p>HTML: </p>
  
  <pre><code>&lt;a id="menu1" href="#menu"&gt;BUTTON&lt;/a&gt;
  &lt;a class="mm-title"&gt;TITLE&lt;/a&gt;
  </code></pre>
  
  <p>JAVASCRIPT: </p>
  
  <pre><code> $(function(){
    $("#menu1").click(function(){
        $(this).addClass("active");
        $("a.mm-title").addClass("remove");
    });
   });
  </code></pre>
  
  <p>CSS: </p>
  
  <pre><code>.remove { display: none; }
  </code></pre>
  
  <p>Tried using this one but seems to have a problem with toggling back to inactive state. the 2nd click doesnt do anything but by the third time goes back to normal</p>
  
  <p>JAVASCRIPT:</p>
  
  <pre><code>$(function(){
    $("#menu1").click(function(){
        $(this).toggleClass("active");
        $("a.mm-title").toggleClass("remove");
    });
   });
  </code></pre>