If you use $("#frameItemCode").text('abc') to change the lable (as you commented), just call alert("changed") after that. There is no need to define an event listener.
$("#frameItemCode").text('abc'); alert("changed");
If the label changes in several ways, define timeInterval to check if the label has changed,
function inspectLabel(callback){ var label = $("#frameItemCode").text(); setInterval(function(){ var newlabel = $("#frameItemCode").text(); if (newlabel != label){ callback(); label = newlabel; } }, 100); } inspectLabel(function(){ alert('changed'); });
source share