Using INPUT CHANGE event on IE
On IE the change event behaves in a diferent way. The event only gets fired when the input loses the focus.
So if you need to get a realtime change event that works fine in all major browsers + IE, I suggest to use a very similiar event, KEYUP event.
//FAILS in IE
var txt = $(selector);
txt.change(function (evt) {
console.log("change");
});
//OK in IE
var txt = $(selector);
txt.keyup(function (evt) {
console.log("keyup");
});Written by Ion D. Filho
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Jquery
Authors
Filed Under
Did you know?
JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.
Security insights from Cside
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#