Bypassing the IE "onchange" bug with jQuery
I absolutely love jQuery! I use it daily with my client side work, putting the jQuery file into my JS library has become an automated thing I do.
Well, after saying that, even jQuery can’t fix all the IE bugs and quirks. Sometimes you have to bypass them with intelligence and some style
The bug I’m talking about is the one that disables the “onchange” event from firing when the element still has focus.
This phenomenon is absolutely frustrating when you have to react to a checkbox or a radiobutton.
Well, like everything else in jQuery, after scratching my head for a second or two (or 20, or 200) I came up with this solution:
This works like a charm.
Good luck! If you find it useful drop me a line in the comments below…Submit to Hacker News
[NOTE] This post has been imported to Hugo from a Wordpress blog. It may be broken, missing images, code snippets or other information.
[NOTE] updated October 20, 2009. It's 3387 days old . This article may have outdated content.