Index: trunk/phase3/resources/jquery/jquery.tabIndex.js |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | // becuase it has a default value for tabIndex in IE6/IE7 of 0 |
17 | 17 | // (rather than null/undefined). Therefore check "> 0" as well |
18 | 18 | if ( tabIndex > 0 ) { |
19 | | - if ( i === 0 ) { |
| 19 | + if ( minTabIndex === null ) { |
20 | 20 | minTabIndex = tabIndex; |
21 | 21 | } else if ( tabIndex < minTabIndex ) { |
22 | 22 | minTabIndex = tabIndex; |
— | — | @@ -34,7 +34,7 @@ |
35 | 35 | var maxTabIndex = null; |
36 | 36 | $(this).find( '[tabindex]' ).each( function( i ) { |
37 | 37 | var tabIndex = parseInt( $(this).attr( 'tabindex' ), 10 ); |
38 | | - if ( i === 0 ) { |
| 38 | + if ( maxTabIndex === null ) { |
39 | 39 | maxTabIndex = tabIndex; |
40 | 40 | } else if ( tabIndex > maxTabIndex ) { |
41 | 41 | maxTabIndex = tabIndex; |