Posted By

vagrantradio on 05/17/11


Tagged

keypress


Versions (?)

jQuery Simulate Keypress Trigger


 / Published in: jQuery
 

  1. //this works
  2. e = jQuery.Event("keyup");
  3. e.which = 13 //enter key
  4. jQuery('input').trigger(e);
  5.  
  6. //this doesn't
  7. e = jQuery.Event("keypress");
  8. e.which = 13 //enter key
  9. jQuery('input').trigger(e);

Report this snippet  

You need to login to post a comment.