I have a hidden field called #myHiddenField
say.
The content of this field is programatically changed at various places.
I'd like a method that detects that change. The change event won't fire unless I type into the field but this is impossible.
Is there a jQuery way to detect programatic content change in a field?
You should be able to trigger the change event with:
$('#myHiddenField').change();
OR
$('#myHiddenField').trigger('change');
Of course this will require the block of code responsible for updating the filed to make one of those calls after it has done its work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With