title: Issue with stop(true).slideDown() during slideUp(), is a jquery bug?
body: <p>I have the code for a collapse menu pasted below or see it on <a href="http://jsfiddle.net/HuCmy/35/" rel="nofollow">jsfiddle</a>.</p>
  
  <p>The issue is when the submenu is in the sliding up state, and it is clicked again, it stops but is not being animated backwards (instead the submenus are jumping out but their container is keeping its current height - no jump with jQuery 2.0.0.b1). Tested in Firefox and Chrome with the same result.</p>
  
  <p>Is this a jQuery bug, or just me?</p>
  
  <p><strong>Update</strong>: I have <a href="http://bugs.jquery.com/ticket/13483" rel="nofollow">filed a bug report</a> for jQuery, because I think that this is a jQuery bug.</p>
  
  <p><strong>Update 2</strong>: See Brad M's accepted answer with the explanation of this behavior (but I still think that this is an issue with jQuery which needs to be solved internally).</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;ul&gt;
      &lt;li&gt;&lt;a href="#"&gt;Menu1&lt;/a&gt;&lt;/li&gt;
      &lt;li class="opened"&gt;&lt;a href="#"&gt;Submenus 1&lt;/a&gt;
          &lt;ul class="submenu"&gt;
              &lt;li&gt;&lt;a href="#"&gt;submenu1-1&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;submenu1-2&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;&lt;/li&gt;
      &lt;li class="closed"&gt;&lt;a href="#"&gt;Submenus 2&lt;/a&gt;
          &lt;ul class="submenu"&gt;
              &lt;li&gt;&lt;a href="#"&gt;submenu2-1&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;submenu2-2&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#"&gt;Menu4&lt;/a&gt;
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p><strong>Javascript</strong></p>
  
  <pre><code>var initMenu = function() {
      $("li.closed &gt; ul.submenu").css("display", "none");
  
      var toggleMenu = function(li) {
          if (li.hasClass("opened") || li.hasClass("inslidedown")) {
              li.removeClass("opened inslidedown").addClass("inslideup").find("ul").first().stop(true).slideUp({
                  duration: 1000,
                  complete: function() {
                      li.addClass("closed").removeClass("inslideup");
                  }
              });
          }
          else if (li.hasClass("closed") || li.hasClass("inslideup")) {
              li.removeClass("closed inslideup").addClass("inslidedown").find("ul").first().stop(true).slideDown({
                  duration: 1000,
                  complete: function() {
                      li.addClass("opened").removeClass("inslidedown");
                  }
              });
          }
      };
  
      $("ul").on("click", "li.opened a, li.closed a, li.inslideup a, li.inslidedown a", function(e) {
          e.preventDefault();
          toggleMenu($(this).closest("li"));
      });
  };
  
  $(document).ready(function() {
      initMenu();
  });
  </code></pre>