Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/86.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/sorting/2.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
Jquery 数据表:排序箭头没有响应,如何让它们对表进行实际排序?_Jquery_Sorting_Datatables_Jquery Datatables - Fatal编程技术网

Jquery 数据表:排序箭头没有响应,如何让它们对表进行实际排序?

Jquery 数据表:排序箭头没有响应,如何让它们对表进行实际排序?,jquery,sorting,datatables,jquery-datatables,Jquery,Sorting,Datatables,Jquery Datatables,我已经用非常基本的设置(oLanguage、bFilter:false、bSort:true)设置了一个表,它确实在列标题中显示了排序箭头(第一列只显示向上箭头)。但是,单击任何其他箭头都不会执行任何操作。。。 我怎样才能让他们反应灵敏 (错误控制台未显示任何问题) 下面是一个精简的示例: <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.01 Strict//EN"> <meta http-equiv="content-type" cont

我已经用非常基本的设置(oLanguage、bFilter:false、bSort:true)设置了一个表,它确实在列标题中显示了排序箭头(第一列只显示向上箭头)。但是,单击任何其他箭头都不会执行任何操作。。。 我怎样才能让他们反应灵敏

(错误控制台未显示任何问题)

下面是一个精简的示例:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.01 Strict//EN">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<html>
    <head>
        <title>data</title>
        <link rel="stylesheet" type="text/css" href="inc/jquery.dataTables.css" />
        <link rel="stylesheet" type="text/css" href="inc/jquery.dataTables_themeroller.css" />
        <link rel="stylesheet" href="themes/base/jquery.ui.all.css" />
    </head>
    <script type="text/javascript" src="inc/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="inc/jquery-1.9.1.js"></script>      
    <script type="text/javascript" src="inc/jquery.ui.core.js"></script>    
    <script type="text/javascript" src="inc/jquery.ui.widget.js"></script>      

    <script type="text/javascript" src="inc/jquery.dataTables.js"></script>    
    <body>

        <table width="100%" id="vorgangsliste">
            <thead>

                <tr>
                    <th class="left" width="50px" align="center"> <b>ID</b> </th>
                    <th class="left" width="50" align="left"> <b>Termin</b> </th>
                    <th class="middle" width="100px" align="left"> <b>Author</b> </th>
                    <th class="left" width="*" align="left"> <b>Titel</b> </th>
                    <th class="FlowLine" width="50px" align="right"> &nbsp; </th>
                </tr>
            </thead>
            <tbody>
                <tr class='oddRow'>
                    <td class="left" width="200px" align="center">BaasTest-20131114-0720</td>
                    <td width="100px" >
                    28.12.2012        </td>
                    <td class="middle" width="100px" align="left">Michael Baas</td>
                    <td class="right" width="*" align="left">
                        <a href="#">Manuell angelegt</a>
                    </td>
                    <td width="50px" align="right">
                        <a href="#">L</a>
                    </td>
                </tr>
                <tr class='evenRow'>
                    <td class="left" width="200px" align="center">BaasTest-20131114-0902</td>
                    <td width="100px" >
                    24.12.2012        </td>
                    <td class="middle" width="100px" align="left">Michael Baas</td>
                    <td class="right" width="*" align="left">
                        <a href="#">Nochmals manu</a>
                    </td>
                    <td width="50px" align="right">
                        <a href="#">L</a>
                    </td>
                </tr>
            </tbody>
        </table>

        <script type="text/javascript" charset="utf-8">
            $(document).ready(function() {
                $('#vorgangsliste').dataTable({
                    "oLanguage": { "sUrl": "inc/language/de_DE.txt" }  ,
                    "bFilter": false,
                    "bSort":true
                }
                );
            } );
        </script>

    </body>
</html>

数据
身份证件
终点站
作者
滴度
BaasTest-20131114-0720
28.12.2012        
迈克尔·巴斯
BaasTest-20131114-0902
24.12.2012        
迈克尔·巴斯
$(文档).ready(函数(){
$('#vorgangliste')。数据表({
“oLanguage”:{“sUrl”:“inc/language/de_de.txt”},
“bFilter”:错误,
“bSort”:正确
}
);
} );

编辑11月15日:这越来越陌生了:我通过设置changing
“bfilter”:true
,成功地让我的示例生效。然而,当我在我的高效代码中这样做时,它并没有产生这种效果。令人惊讶的是,当我更改回“bfilter”时,请确保所有列都有一个标题。如果您的任何表列没有相应的标题,那么箭头将没有响应。

哦,天哪,这是一个漫长而艰难的练习-但最后我找到了原因:在语句
“oLanguage”:{“sUrl”:“inc/language/de_de.txt”}
中,我指的是一个不存在的文件。在最终将该文件提供到正确的位置后,一切正常!:)

你能粘贴你的代码/html吗?如上面我的代码所示,所有列都有一个标题。最后一列的标题是一个空格,但即使我输入“真实文本”,它也不会改变。