<p>Let's say:</p>

<pre><code>&lt;div&gt;
  pre text
  &lt;div class="remove-just-this"&gt;
    &lt;p&gt;child foo&lt;/p&gt;
    &lt;p&gt;child bar&lt;/p&gt;
    nested text
  &lt;/div&gt;
  post text
&lt;/div&gt;
</code></pre>

<p>to this:</p>

<pre><code>&lt;div&gt;
  pre text
  &lt;p&gt;child foo&lt;/p&gt;
  &lt;p&gt;child bar&lt;/p&gt;
  nested text
  post text
&lt;/div&gt;
</code></pre>

<p>I've been figuring out using Mootools, jQuery and even (raw) JavaScript, but couldn't get the idea how to do this.</p>

Using
jQuery
you can do this:
```
```
var cnt = $(".remove-just-this").contents();
$(".remove-just-this").replaceWith(cnt);
```
```
Quick links to the documentation:
contents
( ) :
jQuery
replaceWith
(
content
: [
String
|
Element
|
jQuery
] ) :
jQuery