Skip to content

Commit ca59060

Browse files
committed
Merge pull request #94 from abiezerm/master
Dont allow keys using shift (#, $, %)
2 parents 7e93c29 + 9450deb commit ca59060

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

numeric/jquery.numeric.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ $.fn.numeric.keypress = function(e)
7070
{
7171
return false;
7272
}
73+
//dont allow #, $, %
74+
else if(key == 35 || key == 36 || key == 37){
75+
return false;
76+
}
7377
var allow = false;
7478
// allow Ctrl+A
7579
if((e.ctrlKey && key == 97 /* firefox */) || (e.ctrlKey && key == 65) /* opera */) { return true; }

0 commit comments

Comments
 (0)