0

My work in JavascriptMVC is capturing the enter press event and i have steal ('jquery/event/key') plugin and my code is

'input keypress': function(ev){
alert("inside");
alert(ev.key());
if(ev.key() == '\r') {
alert("enter");
}
},

but it doesn't work in firefox itself my first alert('inside') is working but after that it says "ev.key() is not a function". Can anyone help me

rajapallavan
  • 101
  • 1
  • 7

1 Answers1

0

What object is ev? Isn't 'key' a property instead? Maybe this will help How to detect pressing Enter on keyboard using jQuery?

Community
  • 1
  • 1
mtanksl
  • 592
  • 6
  • 9