I want to clear out the "normal text", but no glyphicon's.
The important code sections and its results:
$("#btn_test").html()will give me:"<span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span> Speichern & schließen"$("#btn_test").text()will give me:" Speichern & schließen"
I just want to delete the text "" Speichern & schließen", without .replace(...)-function (because the text is dynamic).
I tried $("#btn_test").text(""), but this will clear also my span element.
Thank you.
Updated('possible duplicate'): Yes, it is the same question like here, but not the answer of Chris Davis, which solved my problem.