-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?

2
  • Can you explain more,what you are trying to achieve ? Commented Aug 15, 2015 at 17:44
  • @all -- Sorry, I may not have been clear in the OP. I updated it to (hopefully) be clearer. Commented Aug 15, 2015 at 17:48

1 Answer 1

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" )

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.