0

Context : I made a website with a search function but I wanted to block the display of the code when hitting enter key. This is a basic function to block the submit when .yith-s is called ( my search function )

I made this script :

jQuery(document).ready(function($) {
  var form = $('form');
  form.on('submit', function () {
    if (form.find('.yith-s').length > 0) {
      return false;
    }
  });
});

And it works very well with chrome and firefox.

However, this does not work with IE.

Do you know how i can make it work with IE ( 9 would be awesome ) ?

dodopok
  • 868
  • 14
  • 22
Relisora
  • 1,163
  • 1
  • 15
  • 33
  • Can you elaborate on how your code "doesn't work"? What were you expecting, and what actually happened? If you got an exception/error, post the line it occurred on and the exception/error details. Please [edit] these details in or we may not be able to help. – Blue Jul 29 '16 at 13:57
  • [Submit button does not trigger a jQuery bind'ed submit event on IE](http://stackoverflow.com/questions/3787840/submit-button-does-not-trigger-a-jquery-binded-submit-event-on-ie) – Aminadav Glickshtein Jul 29 '16 at 13:59
  • [IE-specific issues with live ('submit')](http://forum.jquery.com/topic/ie-specific-issues-with-live-submit) – Aminadav Glickshtein Jul 29 '16 at 13:59

0 Answers0