Skip to content

Instantly share code, notes, and snippets.

@jlcrow
Created October 27, 2015 00:01
Show Gist options
  • Save jlcrow/b4710188c63523ac0adf to your computer and use it in GitHub Desktop.
Save jlcrow/b4710188c63523ac0adf to your computer and use it in GitHub Desktop.
Adding tab index automatically with jQuery
$(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