I'm trying to fire an event on the right and left arrow key with jQuery. By using the following code, I can fire incidents on any alphanumeric key, but the cursor keys (top, bottom, left, right) are nothing but fire. I am mainly developing the site for IE users because this is a line of business app, am I doing something wrong here?
$ ('document'). Keypress (function (e) {switch (e.j.) (case 40: warning ('down'); break; case 38: warning ('above'); break; case 37: warning ('left'); break; Case 39: Warning ('True'); Break; Default: Warning ('???');}});
e Which does not work in IE E. Keycode , if you are targeting IE, then you probably want to use the keydown () instead of keypress ().
See for more information.
Comments
Post a Comment