I have the below piece of code which is used to simulate a text box:
You can use this event DOMSubtreeModified
:
$("span").on('DOMSubtreeModified', function () {
alert("Span HTML is now " + $(this).html());
});
Snippet
$(function () {
$("a").click(function () {
$("span").html("Hello, World!");
});
$("body").on('DOMSubtreeModified', "span", function () {
alert("Span HTML is now " + $(this).html());
});
});
Hello
Click