How to delete all text following an element?
Assume the following simplified code:
- <div class="aaa" ....>
- ....
- </div>
- sometext
- ....
How can I delete all text following the element(s) with the class "aaa"?
When I write
$(".aaa"):nextAll().remove();
then the text is NOT referenced/removed since nextAll() resp remove() address only elements but not simple text.
How else does this work?
Peter