Posted By

bitsculptor on 02/04/13


Tagged

javascript jquery tabindex


Versions (?)

Reset tabindex on pageload


 / Published in: JavaScript
 

URL: http://greatwebguy.com/programming/dom/setting-your-tabindex-on-your-html-forms-automatically-with-jquery/

This will reset the tabindex of all input fields on a form after page load

  1. $(function(){
  2. var tabindex = 1;
  3. $('input,select').each(function() {
  4. if (this.type != "hidden") {
  5. var $input = $(this);
  6. $input.attr("tabindex", tabindex);
  7. tabindex++;
  8. }
  9. });
  10. });

Report this snippet  

You need to login to post a comment.