views:

72

answers:

1

Hi,

I'm working on this Javascript script that works nice in Safari and Chome but for some reason it doesn't work at all in Firefox. I identified the line that caused this: it's "break;".

How do I fix this?

+1  A: 

What Nick said (remove the break)! If you are attempting to stop the event from bubbling try:

e.stopPropagation(); // this will stop any other parent handlers from firing
e.stopImmediatePropagation(); // this will stop any other handlers (including on the current object from firing.
e.preventDefault(); // this will stop the browser from handling the event.
jhorback