-2

I have a little jsFiddle: https://jsfiddle.net/1wkwdja7/

For some reason the change event is not firing when I set the value property of the inputField to "Barney". Typing text into the input field causes the event to fire but I need to have the event fire whenever the value property of the input changes, even if that property is changed programmatically, as it is in my example.

What am I doing wrong here?

Tom Baxter
  • 2,034
  • 2
  • 18
  • 38

1 Answers1

0

https://api.jquery.com/change/

as you can see in the yellow note changing the value with JavaScript wont fire the event. You can fire it using .trigger( "change" )

Gus
  • 922
  • 9
  • 29