0

I have tried this code but it is not working.

var wizardForm = $('#form');

wizardForm.on('keyup keypress', function(e) {
  var code = e.keyCode || e.which;
  if (code == 13) { 
    e.preventDefault();
    return false;
  }
});
Gustavo Reyes
  • 1,313
  • 1
  • 17
  • 31

1 Answers1

1

This article solved my queestion:

$(window).keydown(function(event){
    if(event.keyCode == 13) {
    event.preventDefault();
    return false;
    }
});
Gustavo Reyes
  • 1,313
  • 1
  • 17
  • 31