Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In a web site tabindex is not maintained properly.
Is it possible to give proper tabindex for all the page by using a single script(JavaScript or j query) Otherwise I have to change tabindex for all pages manually.

Please help.
Posted
Updated 14-Dec-10 3:31am
v2

1 solution

I have got nice solution from jquery website.Its working fine.

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

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900