codescribblr
2/13/2014 - 9:41 PM

JavaScript: Reset tabindex on pageload

JavaScript: Reset tabindex on pageload

$(function(){
    var tabindex = 1;
    $('input,select').each(function() {
        if (this.type != "hidden") {
            var $input = $(this);
            $input.attr("tabindex", tabindex);
            tabindex++;
        }
    });
});