title: Ben Kamens jQuery Menu Aim: Sub menu wont reappear after it disappears
body: <p>Looking at Ben Kemens <a href="https://github.com/kamens/jQuery-menu-aim" rel="nofollow noreferrer">jquery-menu-aim</a>, I stumbled upon an example at <a href="https://codepen.io/mattweb/pen/pkvlh" rel="nofollow noreferrer">codepen</a>. </p>
  
  <p>This (<a href="https://codepen.io/mattweb/pen/pkvlh" rel="nofollow noreferrer">codepen</a>) works and allows the user time to pass from the main menu to the sub menu BUT if you move away from the menu completely the submenu still keeps showing i.e. it (the submenu) won't go away (display:none).</p>
  
  <p>So, I recreated the same example at codepen on <a href="https://jsfiddle.net/j8m6dxqo/" rel="nofollow noreferrer">JsFiddle</a> and changed the Javascript </p>
  
  <p>from:</p>
  
  <pre><code>$(document).click(function() {
      $('a.hover').removeClass('hover');
      $('.popover').css('display', 'none');
  }
  </code></pre>
  
  <p>to:</p>
  
  <pre><code>$(document).click(function() {
      $('a.hover').removeClass('hover');
      $('.nav ul ul').css('display', 'none');
  }
  </code></pre>
  
  <p>Now, if you click anywhere on the web page, apart from the menu/sub menu, the sub menu disappears as it should. </p>
  
  <p>Problem: The sub menu won't reappear if you hover the main menu again.</p>
  
  <p>How do I solve this?</p>
  
  <p>Edit: Is there an alternate jQuery / Javascript to jquery-menu aim?.</p>