Return to Snippet

Revision: 25926
at April 14, 2010 08:49 by tbelknap


Initial Code
/*////////////////////////////////////////////////////////////////
// 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++;
	});
}

Initial URL

                                

Initial Description
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.

Initial Title
Organize Tab Indeses using jQuery

Initial Tags
forms

Initial Language
jQuery