title: Error when trying to execute two onclick actions on the same div
body: <p>I have a little problem here, and if someone could help me, I will truly appreciate.</p>
  
  <p>I have a menu that opens when I click on a div, and once open, I want to close the menu clicking again on te same div. The problem is that I can open the menu but I can't close it.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;script&gt;
  $(document).ready(function () {
      $("#menuResp").click(function () {
  
          $('#profile_menu').css('margin-left','0px');
          $('#menuResp').css('margin-left','315px');
          $('#menuResp').attr('id', 'menuResp2')
  
      });
  
  
      $("#menuResp2").click(function () {
  
          $('#profile_menu').css('margin-left','-300px');
          $('#menuResp2').css('margin-left','0px');
          $('#menuResp2').attr('id', 'menuResp')
  
      });
  });
  &lt;/script&gt;
  
  &lt;div id="menuResp"&gt;
      &lt;ul id="menuRespCss"&gt;
        &lt;li class="icon-css"&gt;
          &lt;a&gt;Menu&lt;/a&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Anyone have an idea of why this doesn't work?</p>