Posted By

robertoy on 03/19/13


Tagged


Versions (?)

Use "Enter" as "Tab"


 / Published in: jQuery
 

Use "Enter" as "Tab"

  1. $('#content_id').delegate('input[type="text"]', 'keypress', function(e){
  2. if (e.keyCode == 13) {
  3. var l_index = $('input[type="text"]', '#content_id').index($(this));
  4. $('input[type="text"]:eq('+(l_index+1)+')', '#content_id').focus();
  5. return false;
  6. }
  7. });

Report this snippet  

You need to login to post a comment.