Reputation: 1103
I have this script working fine in Chrome but in IE 8 or 9, this code is not working:
$(document).on("mousedown", '#CentroCusto_new option', function (event) {
debugger;
alert('oi');
event.returnValue = false;
this.selected = !this.selected;
event.preventDefault();
});
How to solve this? I think IE is not accepting this selector, but why?
Upvotes: 2
Views: 265
Reputation: 419
debugger;
is pausing execution of your code - which is why alert()
isn't firing
Upvotes: 1