Reset tabindex on pageload


/ Published in: JavaScript
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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. });

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.