Here is a div block:
<div class='contatiner'>
<div class='inner-div'>this is inner content</div>
this is outer content
</div>
Below is the jQuery code being used:
$(".container *:not(.inner-div)").html();
The expected result should be: this is outer content
However, the actual output obtained is:
<div class='inner-div'>this is inner content</div>
this is outer content
I am aware of one solution and request not to provide following as an answer:
$("#container")
.clone()
.children()
.remove()
.end()
.text();