Created
October 27, 2015 00:01
-
-
Save jlcrow/b4710188c63523ac0adf to your computer and use it in GitHub Desktop.
Adding tab index automatically with jQuery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ | |
var tabindex = 1; | |
$('input,select').each(function() { | |
if (this.type != "hidden") { | |
var $input = $(this); | |
$input.attr("tabindex", tabindex); | |
tabindex++; | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment