jquery.tablesorter: Only look at th's for headers
[lhc/web/wiklou.git] / resources / src / jquery / jquery.tablesorter.js
index 5b1e2a7..ae28536 100644 (file)
                        } );
                        // We want to find the row that has the most columns (ignoring colspan)
                        $.each( exploded, function ( index, cellArray ) {
-                               headerCount = $.unique( $( cellArray ) ).length;
+                               headerCount = $( uniqueElements( cellArray ) ).filter( 'th' ).length;
                                if ( headerCount >= maxSeen ) {
                                        maxSeen = headerCount;
                                        longestTR = index;
                                }
                        } );
                        // We cannot use $.unique() here because it sorts into dom order, which is undesirable
-                       $tableHeaders = $( uniqueElements( exploded[longestTR] ) );
+                       $tableHeaders = $( uniqueElements( exploded[longestTR] ) ).filter( 'th' );
                }
 
                // as each header can span over multiple columns (using colspan=N),