internet explorer - Why it doesn't work in IE 6-8 (catching Enter with jQuery) -
this code doesn't work in ie 6-8. why?
$(".put").keydown(function (e) { if (e.keycode == 13) { if ($(this).is(":focus")) { $(this).submit().select(); } return false; } }); here's full page https://rawgithub.com/ruslankh/kurchatovy/master/index.html
thank :)
try using e.which() support browsers
var code = e.which; if(code == 13) { //enter keycode if ($(this).is(":focus")) { $(this).submit().select(); } return false; }
Comments
Post a Comment