Merging resourceloader branch into trunk. Full documentation is at http://www.mediawi...
[lhc/web/wiklou.git] / resources / jquery / jquery.tabIndex.js
1 ( function( $ ) {
2
3 /**
4 * Finds the highest tabindex in use.
5 *
6 * @return Integer of highest tabindex on the page
7 */
8 $.fn.maxTabIndex( function() {
9 var maxTabIndex = 0;
10 $(this).find( '[tabindex]' ).each( function() {
11 var tabIndex = parseInt( $(this).attr( 'tabindex' ) );
12 if ( tabIndex > maxTabIndex ) {
13 maxTabIndex = tabIndex;
14 }
15 } );
16 return maxTabIndex;
17 } );
18
19 } )();