I am currently using this function to detect for any changes made to an input box in jQuery.
$(document).on("input change paste keyup", "input, textarea, select", function(e) {
//do something
});
The problem is that when you change the value of an input through code such as this $("input").val(currentColorChosen);
, the function does not run.
How do I solve this so that the function can detect all changes made to an input, including value changes made through jQuery.