I've two input fields, let's say #a and #b.
By clicking #a and inserting a char I fire an AJAX request. The response is filling the value of #b.
How can I detect any changes here?
The code above only works by doing directly something in the browser
$('#b').on('change input keyup', function(){
var that = $(this);
console.log('changed');
if(that.val()){
console.log(that.val());
}
});
changeevent when your code changes the value of#binside the success of your AJAX call ?$('#b').trigger('change');changeevent :$('#b,#c,...').trigger('change');or$('#commonParent input').trigger('change');