Remove LI from nested list preserve children?
<p>I have a nested UL LI list. e.g. </p>

<p>BEFORE</p>

<pre><code>&lt;ul&gt;
    &lt;li&gt;Item A&lt;/li&gt;
    &lt;li&gt;Item B
        &lt;ul&gt;
            &lt;li id="removeme"&gt;Item BA (REMOVE ME)
            &lt;ul&gt;
                &lt;li&gt;Item BAA&lt;/li&gt;
                &lt;li&gt;Item BAB&lt;/li&gt;
                &lt;li&gt;Item BAC&lt;/li&gt;
                &lt;li&gt;Item BAD
                    &lt;ul&gt;
                    &lt;li&gt;Item BADA&lt;/li&gt;
                    &lt;li&gt;Item BADB&lt;/li&gt;
                    &lt;li&gt;Item BADC&lt;/li&gt;
                    &lt;li&gt;Item BADD&lt;/li&gt;
                    &lt;/ul&gt;                 
                &lt;/li&gt;
                &lt;li&gt;Item&lt;/li&gt;
            &lt;/ul&gt;            
            &lt;/li&gt;
            &lt;li&gt;Item BB&lt;/li&gt;
            &lt;li&gt;Item BC &lt;/li&gt;
            &lt;li&gt;Item BD&lt;/li&gt;
        &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;Item C&lt;/li&gt;
    &lt;li&gt;Item D&lt;/li&gt;
    &lt;li&gt;Item E&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>AFTER :</p>

<pre><code>&lt;ul&gt;
    &lt;li&gt;Item A&lt;/li&gt;
    &lt;li&gt;Item B
        &lt;ul&gt;
            &lt;li&gt;Item BAA&lt;/li&gt;
            &lt;li&gt;Item BAB&lt;/li&gt;
            &lt;li&gt;Item BAC&lt;/li&gt;
            &lt;li&gt;Item BAD
                &lt;ul&gt;
                &lt;li&gt;Item BADA&lt;/li&gt;
                &lt;li&gt;Item BADB&lt;/li&gt;
                &lt;li&gt;Item BADC&lt;/li&gt;
                &lt;li&gt;Item BADD&lt;/li&gt;
                &lt;/ul&gt;                 
            &lt;/li&gt;
            &lt;li&gt;Item&lt;/li&gt;           
            &lt;/li&gt;
            &lt;li&gt;Item BB&lt;/li&gt;
            &lt;li&gt;Item BC &lt;/li&gt;
            &lt;li&gt;Item BD&lt;/li&gt;
        &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;Item C&lt;/li&gt;
    &lt;li&gt;Item D&lt;/li&gt;
    &lt;li&gt;Item E&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>If i wanted to remove the item above in the brackets (or anyitem) by double clicking it for example and remove it from the list however preserving the children elements and re-parenting them.  how would you do this?  i am working on a navigation manager and need to be able to delete items but not the children and have them re-parented.</p>

<p>Any cluees would be great.  </p>

<p>I've though about getting all children of current element the append to current items parent. But that would duplicate the ul. </p>

<p>Thanks</p>

<p>*UPDATED TO INCLUDE BEFORE AND AFTER EXAMPLES</p>
