javascript - Keypress event doesn't work in internet explorer -
i have follow code:
<input class="any" type="text" id="myid" name="myname" />
this input jquery datepicker.. (http://jqueryui.com/datepicker/)
my js follows:
$('#myid').keypress(function(evt) { //codes });
i tried keypress, keydown , keyup.. not working in ie..
may because of jquery date picker plugin?
i tried jquery hotkey plugin (https://github.com/jeresig/jquery.hotkeys/blob/master/jquery.hotkeys.js)
but, no success :(
i want capture enter event..
any help?
felipe
if element doesn't exist on page on initial load, event may not bound button. not sure why works in other browsers though.
could possibly try see if helps
$(document).on('keypress', '#myid', function() { // .... });
if you're using older version of jquery, you'll need use .live().
Comments
Post a Comment