X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fjquery%2Fjquery.tabIndex.js;h=ed37aa1ea3c9b56fb34891692ffdfd6c7fa8e461;hb=d36b183513171d9c7d666323e2b2e3acb561882f;hp=cdae0badc913f5af6b0258e738272399f10e1e32;hpb=a8304d4c73fd04c338ae23f3028fc475921cc0fa;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/jquery/jquery.tabIndex.js b/resources/src/jquery/jquery.tabIndex.js index cdae0badc9..ed37aa1ea3 100644 --- a/resources/src/jquery/jquery.tabIndex.js +++ b/resources/src/jquery/jquery.tabIndex.js @@ -1,17 +1,17 @@ /** - * jQuery tabIndex + * @class jQuery.plugin.tabIndex */ ( function ( $ ) { /** - * Finds the lowerst tabindex in use within a selection + * Find the lowest tabindex in use within a selection. * - * @return number Lowest tabindex on the page + * @return {number} Lowest tabindex on the page */ $.fn.firstTabIndex = function () { var minTabIndex = null; - $(this).find( '[tabindex]' ).each( function () { - var tabIndex = parseInt( $(this).prop( 'tabindex' ), 10 ); + $( this ).find( '[tabindex]' ).each( function () { + var tabIndex = parseInt( $( this ).prop( 'tabindex' ), 10 ); // In IE6/IE7 the above jQuery selector returns all elements, // becuase it has a default value for tabIndex in IE6/IE7 of 0 // (rather than null/undefined). Therefore check "> 0" as well. @@ -29,14 +29,14 @@ }; /** - * Finds the highest tabindex in use within a selection + * Find the highest tabindex in use within a selection. * - * @return number Highest tabindex on the page + * @return {number} Highest tabindex on the page */ $.fn.lastTabIndex = function () { var maxTabIndex = null; - $(this).find( '[tabindex]' ).each( function () { - var tabIndex = parseInt( $(this).prop( 'tabindex' ), 10 ); + $( this ).find( '[tabindex]' ).each( function () { + var tabIndex = parseInt( $( this ).prop( 'tabindex' ), 10 ); if ( tabIndex > 0 && !isNaN( tabIndex ) ) { // Initial value if ( maxTabIndex === null ) { @@ -49,4 +49,9 @@ return maxTabIndex; }; + /** + * @class jQuery + * @mixins jQuery.plugin.tabIndex + */ + }( jQuery ) );