Use native ES5 Array prototype methods instead of jQuery
[lhc/web/wiklou.git] / resources / src / jquery / jquery.tablesorter.js
index cac103e..21209f6 100644 (file)
                                } );
                        } );
                        // We want to find the row that has the most columns (ignoring colspan)
-                       $.each( exploded, function ( index, cellArray ) {
+                       exploded.forEach( function ( cellArray, index ) {
                                headerCount = $( uniqueElements( cellArray ) ).filter( 'th' ).length;
                                if ( headerCount >= maxSeen ) {
                                        maxSeen = headerCount;
         */
        function setHeadersOrder( $headers, sortList, headerToColumns ) {
                // Loop through all headers to retrieve the indices of the columns the header spans across:
-               $.each( headerToColumns, function ( headerIndex, columns ) {
+               headerToColumns.forEach( function ( columns, headerIndex ) {
 
-                       $.each( columns, function ( i, columnIndex ) {
+                       columns.forEach( function ( columnIndex, i ) {
                                var header = $headers[ headerIndex ],
                                        $header = $( header );
 
                                        } );
                                } else {
                                        // Column shall be sorted: Apply designated count and order.
-                                       $.each( sortList, function ( j, sortColumn ) {
+                                       sortList.forEach( function ( sortColumn ) {
                                                if ( sortColumn[ 0 ] === i ) {
                                                        $header.data( {
                                                                order: sortColumn[ 1 ],
                                }
                                return ret;
                        } );
-                       $.each( rowspanCells, function () {
-                               $.data( this, 'tablesorter' ).needResort = false;
+                       rowspanCells.forEach( function ( cell ) {
+                               $.data( cell, 'tablesorter' ).needResort = false;
                        } );
                }
                resortCells();