JSFiddle - React, Tailwind, and code Playground
by Ankit Patidar
HTML
<input type="text">
<input type="text">
<input type="text">
<input type="text">
<input type="text">
<input type="text">
<input type="text">
JavaScript
/* var ti = 0;
jQuery(document).ready(function($) {
$('a, input, select, button, textarea').each()
$('a, input, select, button, textarea').attr('tabindex', ti);
ti++;
}); */
/* $(function() {
var tabindex = 1;
$('input,select').each(function() {
if (this.type != "hidden") {
var $input = $(this);
$input.attr("tabindex", tabindex);
tabindex++;
}
});
}); */
$(":input:not(:hidden)").each(function (i) { $(this).attr('tabindex', i + 1); });