I'm using cropin jQuery plugin in my project and going to pull updates for it in future so I don't want to change it's code.
Inside the plugin it changes the value of <input> element using val() function but doesn't instantly trigger the change event which means that I cannot listen to event using code like this:
on("change", function(){
//do something;
})
*details can be found here: .val() doesn't trigger .change() in jquery
Question: is there any workaround for this? How can I listen to change event without modifying the plugin code if plugin:
uses
val()to modify the elementsvaluedoesn't trigger
changeevent following theval()call?