I want to trigger an event when text inside a <p>
tag has changed. I thought to use change()
but I realize it’s meant for form input elements.
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div>
<p> Hello </p>
</div>
<button id="click">click to change</button>
$("#click").click(function() {
$('p').html("done");
});