/ Published in: jQuery

Keeping track of complex forms - especially those that exist within multiple jQuery UI tabs - can be a pain. This is a simple little function that will reorganize all visible inputs, buttons, drop-downs and links. Use it whenever switching between tabs or adding new elements to the form.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/*//////////////////////////////////////////////////////////////// // oesTabIndexes: Reorganizes tab indexes on the page. // ////////////////////////////////////////////////////////////////*/ jQuery.fn.oesTabIndexes = function() { var tabindex = 1; $("input:visible, select:visible, button:visible, a:visible").each(function() { $(this).attr("tabindex", tabindex); tabindex++; }); }
Comments
