title: how should i disappear submenu?
body: <p>I am using a nav menu in my project.The menu has several menu which again has sub-menu and mega menu.when i click on a link which has a sub menu its items will appear and it will disappear when i click on another link(which has NOT submenu)
  but my problem is : when i click on a link which has sub menu , a previous link's submenu will NOt disappear.so that finally all the links will stay open(showing their submenu) just by clicking on a single link they will disappear.</p>
  
  <pre><code>$(document).ready(function() {
  $('#right-menu &gt; ul li').click(function(event) {
      if($(this).find('ul ').hasClass('active'))
      {
          $(this).find('ul').removeClass('active').slideUp('400');
      }else{
          $(this).find('ul').addClass('active').slideDown('400');
      }
  });
  });
  </code></pre>