I have the following code:
jQuery('#hexVal').change(function() {
var hexvarval = jQuery('#hexVal').val();
jQuery('#thumbnail_hover_color').val(hexvarval);
});
Basically, I want to change value of #thumbnail_hover_color INPUT every time #hexVal INPUT is being changed. When I do it manually it works. When other jQuery script puts text to #hexVal then it doesn’t update #thumbnail_hover_color.
Question: How do I trigger “change value” for one INPUT field each time the value is changed (anyhow) in other INPUT field? I want them to have ALWAYS the same value.
If you’re programmatically setting/changing the value of an input, you’ll also have to programmatically trigger the change event (or call the same code as the change event handler). So, I guess you have two options:
or