mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Better check if a table contains data before using the tablesorter
This commit is contained in:
@@ -69,9 +69,9 @@ if($jqueryV1 && $jqueryCurrent)
|
||||
<script language="Javascript" type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
//
|
||||
if(!$('#<?php echo $tableid; ?>').find('tbody:empty').length
|
||||
&& !$('#<?php echo $tableid; ?>').find('tr:empty').length)
|
||||
// Checks if the table contains data (rows)
|
||||
if ($('#<?php echo $tableid; ?>').find('tbody:empty').length > 0
|
||||
&& $('#<?php echo $tableid; ?>').find('tr:empty').length > 0)
|
||||
{
|
||||
$("#<?php echo $tableid; ?>").tablesorter(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user