If checking for event.preventDefault() you get error messages in IE.
A better way is to check for the existence of event.returnValue (which is IEs preventDefault()) and if it doesn't exist you know that you're not on IE.
if (event.returnValue) {
// this is IE
event.returnValue = false;
} else {
// this is Chrome, Firefox, Safari etc.
event.preventDefault();
}
Keine Kommentare:
Kommentar veröffentlichen