// eslint-disable-next-line no-jquery/no-map-util
return $.map( node.childNodes, function ( elem ) {
if ( elem.nodeType === Node.ELEMENT_NODE ) {
+ // eslint-disable-next-line no-jquery/no-class-state
if ( $( elem ).hasClass( 'reference' ) ) {
return null;
}
while ( i < l ) {
// if this is a child row, continue to the next row (as buildCache())
+ // eslint-disable-next-line no-jquery/no-class-state
if ( rows[ rowIndex ] && !$( rows[ rowIndex ] ).hasClass( config.cssChildRow ) ) {
if ( rowIndex !== lastRowIndex ) {
lastRowIndex = rowIndex;
// if this is a child row, add it to the last row's children and
// continue to the next row
+ // eslint-disable-next-line no-jquery/no-class-state
if ( $row.hasClass( config.cssChildRow ) ) {
cache.row[ cache.row.length - 1 ] = cache.row[ cache.row.length - 1 ].add( $row );
// go to the next for loop
}
$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' );
$cell = $( this );
columns = [];
+ // eslint-disable-next-line no-jquery/no-class-state
if ( !$cell.hasClass( config.unsortableClass ) ) {
$cell
.addClass( config.cssHeader )
$row = $rows.eq( i );
// if this is a child row, continue to the next row (as buildCache())
+ // eslint-disable-next-line no-jquery/no-class-state
if ( $row.hasClass( config.cssChildRow ) ) {
// go to the next for loop
continue;