jQuery dataTables makeEditable() 不是函数 [英] jQuery dataTables makeEditable() is not a function
问题描述
我是 Datatables 的新手,我正在尝试使表格可编辑,但我不断收到此错误:
I'm new to Datatables and I'm trying to make the table editable, but I keep getting this error:
TypeError: $(...).dataTable(...).makeEditable 不是函数
TypeError: $(...).dataTable(...).makeEditable is not a function
我的 jQuery 脚本如下所示:
My jQuery script looks like this:
$(document).ready( function () {
var oTable = $('#data_table_wrapper').dataTable({
"sDom": 'R<"H"lfr>t<"F"ip<',
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"aoColumn": [
{ "bVisible": true },
{ "bVisible": true },
{ "bSortable": false },
]
}).makeEditable({
sUpdateURL: "/abc.php"
});
});
我包含这些文件:
jquery-1.9.1.min.js
jquery.dataTables.min.js
jquery.jeditable.js
jquery.dataTables.editable.js
jquery-ui.js
jquery.validate.js
指向这些文件的所有链接都可以正常工作.任何人都可以给我一些建议吗?为什么我总是收到那个错误?
All links to these files work correctly. Can anyone give me some advice, please? Why do I keep getting that error?
推荐答案
导入必须有一定的顺序:
The imports have to be in certain order:
jquery.min.js
jquery.min.js
jquery-ui.min.js
jquery-ui.min.js
jquery.dataTables.min.js
jquery.dataTables.min.js
jquery.jeditable.js
jquery.jeditable.js
jquery.dataTables.editable.js
jquery.dataTables.editable.js
jquery.validate.js
jquery.validate.js
修复此问题后,更新到最新版本即可解决问题!
After fixing this, update to latest versions fixed the problem!
这篇关于jQuery dataTables makeEditable() 不是函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!