title: JQuery Menu toggle button
body: <p>This is a script of a drop down menu that I created. I want to add when link clicked to close the drop down. Any ideas?</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>$(document).ready(function() {
    $(".menu-icon").on("click", function() {
      $("nav ul").toggleClass("showing");
    });
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" /&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;nav&gt;
    &lt;div class="menu-icon"&gt;
      &lt;i class="fa fa-bars" style="font-size:36px"&gt;&lt;/i&gt;
    &lt;/div&gt;
    &lt;div class="logo"&gt;
      LOGO
    &lt;/div&gt;
    &lt;div class="menu"&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href="#Home"&gt;Home&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#ourTeam"&gt;Our Team&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#imageGallery"&gt;imageGallery&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
  &lt;/nav&gt;
  
  &lt;style&gt;
    .showing {
          max-height: 34em;
    }
  &lt;style&gt;</code></pre>
  </div>
  </div>
  </p>