I have the following input element:
<input type="hidden" id="input_2_204_data" name="input_2_204_data" value>
I need to capture an event when it is changed and value is not empty. I have looked over older SO's questions, however nothing seemed to work.
Here is the latest snippet I have come up with, however it does not work either, and there are no errors in console:
jQuery(document).ready(function(){
var $sign = jQuery('[id$=input_2_204_data]');
$sign.on("change", function(){
alert('hey');
});
});
Any help or guidance is much appreciated.
inputis changed programmatically. You should call a function (or trigger an event manually) on the element when needed.