preventDefault doesn't take effect in firefox

I have an input named shop_cat_edit and the code as below. But in FireFox this code never works... Even IE feels ok with it. What am I doing wrong?

   $('#shop_cat_selector_form').on('submit', function(){e.preventDefault();}); 

Answers 1

  • The variable e is not declared in the function you use it

    function(){             <-- no function param for event is set here

    It should look like this


Related Articles