Jquery 我得到这个$(…).dataTable(…).columnFilter不是一个函数

Jquery 我得到这个$(…).dataTable(…).columnFilter不是一个函数,jquery,datatable,Jquery,Datatable,我想从我看到的开始,我正在使用正确的构造函数 我在运行代码时遇到此错误: $(…).dataTable(…).columnFilter不是函数 html: 项目名称 项目编号 经理 建筑师 $(文档).ready(函数(){ 变量表=$('#activeProjects')。数据表({ “处理”:对, “服务器端”:正确, “ajax”:{ “url”:“./api/Project/GetAll/”, “dataSrc”:” }, “栏目”:[ {“数据”:“项目名称”}, {“数据”:“项目

我想从我看到的开始,我正在使用正确的构造函数

我在运行代码时遇到此错误:

$(…).dataTable(…).columnFilter不是函数

html:


项目名称
项目编号
经理
建筑师
$(文档).ready(函数(){
变量表=$('#activeProjects')。数据表({
“处理”:对,
“服务器端”:正确,
“ajax”:{
“url”:“./api/Project/GetAll/”,
“dataSrc”:”
},
“栏目”:[
{“数据”:“项目名称”},
{“数据”:“项目编号”},
{“数据”:“项目管理器”},
{“数据”:“项目架构师”}
]
}).柱形过滤器({
aoColumns:[{type:“text”},
{type:“text”},
{type:“text”},
{type:“text”}
]
});
});

这里没有问题:(我不得不删除你的ajax内容)@jcunod那么我为什么要得到它?确定这就是正在运行的代码吗?@jcunod是的,我在那个页面上,它正在加载小提琴工作吗?
<table class="table table-striped" id="activeProjects">
    <thead>
        <tr>
            <th>Project Name</th>
            <th>Project Number</th>
            <th>Manager</th>
            <th>Architect</th>
        </tr>
    </thead>
    <tbody>

    </tbody>
    <tfoot>
        <tr>
            <th></th>
            <th></th>
            <th></th>
            <th></th>
        </tr>
    </tfoot>
</table>

<script>
    $(document).ready(function () {

        var table =  $('#activeProjects').dataTable({
            "processing": true,
            "serverSide": true,
            "ajax": {
                "url": "../api/Project/GetAll/",
                "dataSrc": ""
            },

            "columns": [
                { "data": "ProjectName" },
                { "data": "ProjectNumber" },
                { "data": "ProjectManager" },
                { "data": "ProjectArchitect" }
            ]
        }).columnFilter({
            aoColumns: [ { type: "text" },
                         { type: "text" },
                         { type: "text" },
                         { type: "text" }
            ]

        });
    });
</script>