Jquery capture when select list value changed without change event -
i have form select lists show/hide more input fields when values selected.
the problem of users data entry people heavily use keyboard when entering data , select list's change
event fires when focus has left input if done via keyboard. i've tried adding same functionality keypress
, keydown
, work great, not in ie.
unfortunately users state workers forced use ie, know workaround?
here code:
$("div.error_editor select.refreason").live({ 'change': function() { var text = $(this).find(":selected").text(); $(this).parent().siblings("span").toggle(); }, 'keypress': function() { $(this).change(); } });
edit: appears doesn't work in chrome, works fine in firefox
i found solution works in ie , chrome, changed keypress
keyup
$("div.error_editor select.refreason").live({ 'change': function() { var text = $(this).find(":selected").text(); $(this).parent().siblings("span").toggle(); }, 'keyup': function() { $(this).change(); } });
Comments
Post a Comment