title: Closing menu with escape key
body: <p>I have this jquery toggle menu and currently I can only close it if I pressed the X button. What I want to achieve is to have it close using escape key as well. Would appreciate any help I can get. Below is the sample of codes used.</p>
  
  <p>HTML</p>
  
  <pre><code> &lt;section class="menu-section"&gt;
    &lt;div class="menu-toggle"&gt;
      &lt;div class="one"&gt;&lt;/div&gt;
      &lt;div class="two"&gt;&lt;/div&gt;
      &lt;div class="three"&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;nav class="nav-hide"&gt;
          &lt;ul role="navigation" class="hidden"&gt;
              &lt;li&gt;&lt;a href="#"&gt;work&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;about&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;resume&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;contact&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/nav&gt;
  &lt;/section&gt;
  </code></pre>
  
  <p>Here's the JS.</p>
  
  <pre><code>$(".menu-toggle").on('click', function() {
    $(this).toggleClass("on");
    $('.menu-section').toggleClass("on");
    $("nav ul").toggleClass('hidden');  
  });
  </code></pre>