I'm trying to remove any occurense of e\E in the div:
HTML:
<div id="container" class="example">
Some Example text
<span class="abe">
<span class="abe">
this is an inner text of the span
</span>
text in the span
</span>
</div>
CSS
span{color:blue;}
Javascript (jQuery):
$('div').each(function() {
$this = $(this);
$this.text($this.text().replace(/e|E/g, '')); // removes each e\E in the text
});
For some reason my span get stripped out and only it's inner text remains.
WHY? and how can I fix it?
Update:
I know text
gives only the text, I used it becuase I don't want to change the tags attributes. When I used .html
it changed <span id="abe">
to <span id="ab">