title: When one item is open in the nav, close all others width jQuery
body: <p>I have a navigation that is opened/closed with jQuery. And I tried to make it so that when you click eg. Item 2 if any other items are opened it should close them. But now I can't close Item 2.</p>
  
  <pre><code>$(document).ready(
  
  function () {
      $('a.has-child').click(function () {
          $('div.child').not(this).removeClass("open");
          $(this).closest('li').find('div.child').addClass("open");
      });
  });
  </code></pre>
  
  <p>Here's a fiddle: <a href="https://jsfiddle.net/mwcq0yek/" rel="nofollow">https://jsfiddle.net/mwcq0yek/</a></p>
  
  <p>UPDATE: I am able to open Item 4 and close Item 2 and vice versa. But I can't close Item 2 or Item 3 alone.</p>