From: Derk-Jan Hartman Date: Sat, 8 Oct 2011 19:28:10 +0000 (+0000) Subject: Check if there is a prexisting tfoot, before creating a new one. X-Git-Tag: 1.31.0-rc.0~27183 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=6a706e93c242bb87a5eb7358e7fb7106411c6b3d;p=lhc%2Fweb%2Fwiklou.git Check if there is a prexisting tfoot, before creating a new one. Follow up to r98669, though this was a problem that also could surface without tfoot emulation. --- diff --git a/resources/jquery/jquery.tablesorter.js b/resources/jquery/jquery.tablesorter.js index c98861245e..76ab215ca4 100644 --- a/resources/jquery/jquery.tablesorter.js +++ b/resources/jquery/jquery.tablesorter.js @@ -596,7 +596,12 @@ // and put the at the end of the var $sortbottoms = $table.find( 'tr.sortbottom' ); if ( $sortbottoms.length ) { - $table.append( $( '' ).append( $sortbottoms ) ) + var $tfoot = $table.find( 'tfoot' ); + if( $tfoot ) { + $tfoot.eq(0).prepend( $sortbottoms ); + } else { + $table.append( $( '' ).append( $sortbottoms ) ) + } } explodeRowspans( $table );