Merge "TableSorter: Avoid Sizzle selectors"
[lhc/web/wiklou.git] / resources / src / jquery.tablesorter / jquery.tablesorter.js
index 0c28b8e..d34b06c 100644 (file)
                                }
                                $thead.append( this );
                        } );
-                       $table.find( ' > tbody:first' ).before( $thead );
+                       $table.find( ' > tbody' ).first().before( $thead );
                }
                if ( !$table.get( 0 ).tFoot ) {
                        $tfoot = $( '<tfoot>' );
                        headerIndex,
                        exploded,
                        $tableHeaders = $( [] ),
-                       $tableRows = $( 'thead:eq(0) > tr', table );
+                       $tableRows = $( table ).find( 'thead' ).eq( 0 ).find( '> tr' );
 
                if ( $tableRows.length <= 1 ) {
                        $tableHeaders = $tableRows.children( 'th' );