I have a text input field which i have made readonly so the user can’t type into it. I update the value of it with jquery though. So basically I want an event to fire when its value gets changed using jQuery. Below is an example of the input markup and jquery markup.
<input type="text" readonly="readonly" id="textinput" />
$('#textinput').change(function() {
alert("It's Changed!");
});
You won’t be able to do this. Changes made through code do not trigger events. You can simply call
changedirectly in your code.Something like this: