1
How to edit a text div
or your children by clicking on the text, with Javascript or jQuery?
Example, by double-clicking on Text here it is possible to change the text and/or delete it
#alterar {background:#e3e3e3;padding:15px;}
#naoAlterar {background:#ccc;padding:5px;margin:-5px}
<div id="alterar">
Texto aqui
<p>Texto aqui</p>
<span>Texto aqui</span>
<br/><br/>
<div id="naoAlterar">Texto aqui</div>
</div>
The dblclick event is sent to an element when the element is clicked twice. Any HTML element can receive this event. https://api.jquery.com/dblclick/
– user60252