jquery - press Enter in td then pressing tab key -


<div id="unidataint">     <table class="table table-bordered" id="uniresult">         <td contenteditable="true" onfocus="showedit(this);" class="highlight-border">hello</td>         <td contenteditable="true" onfocus="showedit(this);" class="highlight-border">hello1</td>         <td contenteditable="true" onfocus="showedit(this);" class="highlight-border">hello</td>     </table> </div> 

this jquery code:

$('#unidataint').on('keyup', 'td', function() {     if (e.keycode == 13)         return e.keycode = 9; }); 

try following

$(document).ready(function(){     $('#unidataint').on('keydown', 'td', function(e) {         if (e.keycode == 13){             e.preventdefault();             $(this).next().focus();         } }); }); 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -