-1

I have the following lines of code in my .js file

$(triggers.restart).live('click', function (e) {
  e.preventDefault();
  plugin.method.startQuiz(this);
});

The code is working fine in Firefox or Chrome but not in Internet Explorer. What might be wrong?

hichris123
  • 10,145
  • 15
  • 56
  • 70
mahfuz01
  • 453
  • 4
  • 20

1 Answers1

1

In IE preventDefault isn't supported. Instead you set the return value. There's more info about it here: event.preventDefault() function not working in IE

Community
  • 1
  • 1
Evan Trimboli
  • 29,900
  • 6
  • 45
  • 66
  • He appears to be using jquery, and they normalize prevent default for you already. [reference](http://forum.jquery.com/topic/event-preventdefault-and-ie) – sic1 May 04 '12 at 00:08