title: Show and hide the submenu of a menu with more than one option using JQuery
body: <p>I have a menu and i am trying to show and  hide the submenu of each option. The HTML struct is the following:</p>
  
  <pre><code>&lt;a href="/page" class="menu-option" rev="1"&gt;Option 1&lt;/a&gt;
  
  &lt;ul id="submenu-1" class="submenu" style="display:none"&gt;
      &lt;li&gt;&lt;a href="/page"&gt;Option A&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="/page"&gt;Option C&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  
  &lt;a href="/page" class="menu-option" rev="2"&gt;Option 2&lt;/a&gt;
  
  &lt;ul id="submenu-2" class="submenu" style="display:none"&gt;
      &lt;li&gt;&lt;a href="/page"&gt;Option C&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="/page"&gt;Option D&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>In JQuery i have this code:</p>
  
  <pre><code>$(".menu-option").mouseover( function() {
  
      var id_option = $(this).attr("rev");
  
      $("#submenu-" + id_option).fadeIn("fast");
  
  }).mouseout( function() { 
  
  });
  </code></pre>
  
  <p>I don't know what to do in the "mouseout()" event because of this:</p>
  
  <p>1) If the user put the mouse in the option menu and after this put the mouse over the submenu of this option, the submenu must keep open and when the user put the mouse out of the submenu, it must be closed if the user doesn't put the mouse back at the option menu that opened it.</p>
  
  <p>2) If the user put the mouse in the option menu and after this put the mouse over other option menu, the submenu of this option must be closed.</p>
  
  <p>Anybody can please help me to implement this "mouseout()" event?</p>