jquery.tablesorter: Limit the scope of two variables
authorDerk-Jan Hartman <hartman.wiki@gmail.com>
Thu, 7 Aug 2014 16:12:57 +0000 (17:12 +0100)
committerDerk-Jan Hartman <hartman.wiki@gmail.com>
Thu, 7 Aug 2014 16:12:57 +0000 (17:12 +0100)
No functional change, but improves readability of the code

Change-Id: If858d198c9ca0e2feb4930f9f94425262f8afbdc

resources/src/jquery/jquery.tablesorter.js

index 5b1e2a7..b46ab37 100644 (file)
                        colspan,
                        headerCount,
                        longestTR,
                        colspan,
                        headerCount,
                        longestTR,
-                       matrixRowIndex,
-                       matrixColumnIndex,
                        exploded,
                        $tableHeaders = $( [] ),
                        $tableRows = $( 'thead:eq(0) > tr', table );
                        exploded,
                        $tableHeaders = $( [] ),
                        $tableRows = $( 'thead:eq(0) > tr', table );
                        // Loop through all the dom cells of the thead
                        $tableRows.each( function ( rowIndex, row ) {
                                $.each( row.cells, function ( columnIndex, cell ) {
                        // Loop through all the dom cells of the thead
                        $tableRows.each( function ( rowIndex, row ) {
                                $.each( row.cells, function ( columnIndex, cell ) {
+                                       var matrixRowIndex,
+                                               matrixColumnIndex;
+
                                        rowspan = Number( cell.rowSpan );
                                        colspan = Number( cell.colSpan );
 
                                        rowspan = Number( cell.rowSpan );
                                        colspan = Number( cell.colSpan );