Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/89.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 表分类器:Table.config.parsers[c]未定义_Javascript_Jquery_Wordpress_Html Table - Fatal编程技术网

Javascript 表分类器:Table.config.parsers[c]未定义

Javascript 表分类器:Table.config.parsers[c]未定义,javascript,jquery,wordpress,html-table,Javascript,Jquery,Wordpress,Html Table,我在使用时遇到了问题,他似乎无法执行对表格进行排序的功能,有人帮助我,我花了两天时间试图解决这个问题 低于误差 table.config.parsers[c] is undefined Javascript: <?php wp_register_script( 'jquery.tablesorter.js', get_bloginfo('template_url').'/js/jquery.tablesorter.js' ); wp_enqueue_script( 'jq

我在使用时遇到了问题,他似乎无法执行对表格进行排序的功能,有人帮助我,我花了两天时间试图解决这个问题

低于误差

table.config.parsers[c] is undefined
Javascript:

<?php
    wp_register_script( 'jquery.tablesorter.js', get_bloginfo('template_url').'/js/jquery.tablesorter.js' );
    wp_enqueue_script( 'jquery.tablesorter.js' );
?>

表代码:

<table class="widefat tablesorter">
    <thead>
        <th width "70%">
        <u>Login do usuário:</u>  guilherme | <u>Nome do usuário:</u>    <span style="font-size:10;"> (<a href="admin.php?page=manage-files-main&deletefolder=/home/httpd/vhosts/simmmers.com.br/httpdocs/wp-content/uploads/file_uploads/62"> Deletar pasta</a>) </span> 
        </th>
        <th></th>
        <th>Date</th>
        <th width="20%">Category</th>
        <th width ="10%"></th>
    </thead>
    <tbody>
        <tr>
            <td>
            <input type="checkbox" name="change_cat1" value="addit" /> 
            <input type="hidden" name="file1" value="Indice de Confiança do Empresário Março-SC 2013.pdf.pdf" >
            <input type="hidden" name="changecat_user1" value="62"> 
            <img src="http://www.simmmers.com.br/wp-content/plugins/user-files/img/pdf.jpg" width="20" >   Indice de Confiança do Empresário Março-SC 2013.pdf
        </td>
        <td>
            <textarea name="notes1" rows=3 cols=30></textarea>
        </td>
        <td>25/03/2013</td>
        <td>Indicadores</td>
        <td align="right">
            <form method="post" action="/wp-admin/admin.php?page=manage-files-main">
            <a href="http://www.simmmers.com.br/wp-content/uploads/file_uploads/62/Indice de Confiança do Empresário Março-SC 2013.pdf.pdf" title="Download Indice de Confiança do Empresário Março-SC 2013.pdf.pdf">
            <img src="http://www.simmmers.com.br/wp-content/plugins/user-files/img/download.png"   alt="" width="20" height="20" /></a> |<input type="image" name="deletefile" value="62/Indice de Confiança do Empresário Março-SC 2013.pdf.pdf" title="Delete Indice de Confiança do Empresário Março-SC 2013.pdf.pdf" src="http://www.simmmers.com.br/wp-content/plugins/user-files/img/delete.png " alt="" width="20" height="20" /></form>    
        </td>
        </tr>
    </tbody>
</table>

登录到usuário:Guillerme | Nome do usuário:()
日期
类别
2013年3月3日确认指标(Indice de Confiança do Empresário Março-SC.pdf)
25/03/2013
印度教徒
|    

我知道现在回答有点晚了,但我发现,如果表是空的(可能是由于PHP查询从db中生成了零行),就会触发此错误

您可以使用一种简单的方法:如果表为空,则从表标记中删除
data sort=“table”
属性。这样,如果您的JS代码如下所示:

    $("[data-sort=table]").tablesorter({
      sortList: [[0,0]]
    });

您可以确定,它将避免所有的空表,只留下已填充的表即可进行排序。

在我的例子中,有些行中有colspan(有点像副标题行),而tablesorter会在这些行上抛出异常。

您使用的插件是什么?你能发布完整的或更好的(包含更多信息)代码吗?@demonofnight插件是Table Sorter,我在帖子中添加了链接。你是否为你的专栏使用了特定的专栏解析器?你是如何初始化插件的?这个问题和你上一个问题有什么不同?当你解决最初的问题时,为什么你没有将你的上一篇文章标记为已回答?@KevinB我把表格代码放在帖子中,另一篇帖子是另一个问题。