onchange doesn't fire when modified by javascript
问题 I am using spectrum (https://github.com/bgrins/spectrum), a jQuery plugin for color palletes. My goal is that the color is being directly applied on the background, while the user is browsing the different colors. What I have so far is this: //*****Part of a 3rd party file, which I cannot modify**** $("#picker1").spectrum({ allowEmpty:true, color: "#ECC", showInput: true, preferredFormat: "hex", }); //*********************************** $("#picker1").on("change keyup paste", function(){