I’m building a system where I’m attaching a function to an event trigger. Everything was working great (I typically develop in Chrome because of speed and the developer console). However, I hopped over to IE7 and IE8 (I use spoon.net’s app and highly recommend it), but the function wasn’t reading the event.target.value.
Original (incorrect):
function dosomething(event) {
var x = event.target.value;
}
New (works in all browsers):
function dosomething(event) {
var x = $(event.target).val();
}
Good ‘ol jQuery!
