I have the following html
<div class="outer">
Some Text
<div class="inner">
.....
</div>
</div>
How would I remove or change the "Some Text" without affecting the inner div?
I have the following html
<div class="outer">
Some Text
<div class="inner">
.....
</div>
</div>
How would I remove or change the "Some Text" without affecting the inner div?
You could use:
$('.inner').each(function (){
this.parentNode.removeChild(this.previousSibling);
});