title: Append Existing UL to Existing Preceding LI
body: <p>I'm attempting to move an existing <code>ul</code> into an existing <code>li</code> that is immediately preceding the <code>ul</code>.</p>
  
  <pre><code>&lt;ul class="sub-menu" aria-labelledby="desktop-submenu"&gt;
    &lt;li class="has-children current-page-ancestor current-page-parent"&gt;
      &lt;a href="/improve-clinical-care/clear/" class="current_page_item"&gt;Clear&lt;/a&gt;
    &lt;/li&gt;
    &lt;ul class="sub-sub-menu"&gt;
      &lt;li class="level-three"&gt;
        &lt;a href="/improve-clinical-care/clear/clears-story/" class="current_page_item"&gt;Clear's Story&lt;/a&gt;
      &lt;/li&gt;
      &lt;li class="level-three current-menu-item page-item-34 current_page_item"&gt;
        &lt;a href="/improve-clinical-care/clear/sign-up-for-clear/" class="current_page_item"&gt;Sign-Up for Clear&lt;span class="sr-only"&gt;(current)&lt;/span&gt;&lt;/a&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
    &lt;li class="has-children critical-care"&gt;
      &lt;a href="/improve-clinical-care/critical-care/" class="current_page_item"&gt;Critical Care&lt;/a&gt;
    &lt;/li&gt;
    &lt;ul class="sub-sub-menu"&gt;
      &lt;li class="level-three"&gt;
        &lt;a href="/improve-clinical-care/critical-care/pain-agitation-delirium/" class="current_page_item"&gt;Pain Agitation &amp;amp; Delirium&lt;/a&gt;
      &lt;/li&gt;
      &lt;li class="level-three"&gt;
        &lt;a href="/improve-clinical-care/critical-care/glycemic-control/" class="current_page_item"&gt;Glycemic Control&lt;/a&gt;
      &lt;/li&gt;
      &lt;li class="level-three"&gt;
        &lt;a href="/improve-clinical-care/critical-care/critical-care-working-group/" class="current_page_item"&gt;Critical Care Working Group&lt;/a&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>What I'm trying to do is to move the <code>&lt;ul class="sub-sub-menu"&gt;</code> items into the preceding <code>&lt;li class="has-children"&gt;</code>, since we obviously can't have a <code>ul</code> as a child of another <code>ul</code>.</p>
  
  <p>Is this even possible with jQuery? I've come so close with the <code>append()</code> method, but because there are so many occurrences of <code>has-children</code>, I end up with one of the <code>has-children</code> LIs with ALL the <code>sub-sub-menu</code>'s appended to it.</p>
  
  <p>Any help on this would be so greatly appreciated. Thanks gang!</p>