James James - 11 months ago 33
Javascript Question

jquery input field change even when value is changed via jquery

I am attempting to capture when a text input field's value is changed. I am using:


This works if I type the new value in directly. However, the value of the input field is being changed by jquery. There are several of these fields, and I need to know when any have changed. Is there a way to detect this change?

Sorry, I wasn't clear. I'm not the one changing the value. It's an addon that I would rather not modify in case I need to port it to another project.


Ok, so you can't do what I wanted to do, but here is a work-around. I just made an interval and changed my
event to an

$("input[name=color]").each(function(){ my code })


There is no way to detect the changes done programmatically.

However you can trigger a change event whenever you modify its value.