单元格内带有 jquery 多重选择的数据表不会出现在分页的第 2 页上
我正在使用 Datatables 并让这个 jquery 插件显示在几列中 http:// /www.erichynds.com/jquery/jquery-ui-multiselect-widget/ 它出现在页面加载时的所有单元格中,但是当我单击第 2 或第 3 页时,选择按钮不存在。选择菜单的源代码位于页面中,但未生成菜单按钮,因此我在单元格中看不到它。
这是我的数据表和选择菜单的代码
var oTable4;
$(document).ready(function() {
oTable4 = $('#keywords').dataTable( {
"sDom":'t<"bottom"filp><"clear">',
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"aoColumns": [
{ "bSortable": false, "sWidth": "10px" },
null,
null,
null,
null,
null,
null,
null,
null,
null
]
}
).makeEditable({
sUpdateURL: "UpdateData.php",
"aoColumns": [
null,
null,
null,
null,
null,
null,
null,
null,
null,
{
tooltip: 'Click to link to',
type: 'text',
submit:'Ok',
cancel:'Cancel',
width: "100px"}
]
});;
});
$(function(){
$("select.multiselect").multiselect({
noneSelectedText: "- select one -",
header: false,
classes: "kw-wrapper fixed kwm-button",
multiple: false,
selectedList: 1
});
});
I'm using Datatables and have this jquery plugin showing in a few columns http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/ it appears in all the cells wehn the page loads, but when I click page 2 or 3 the select button isn't there. The source code for the select menu is in the page but the button for the menu isn't being generated so I don't see it in the cells.
Here's my code for datatables and the select menu
var oTable4;
$(document).ready(function() {
oTable4 = $('#keywords').dataTable( {
"sDom":'t<"bottom"filp><"clear">',
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"aoColumns": [
{ "bSortable": false, "sWidth": "10px" },
null,
null,
null,
null,
null,
null,
null,
null,
null
]
}
).makeEditable({
sUpdateURL: "UpdateData.php",
"aoColumns": [
null,
null,
null,
null,
null,
null,
null,
null,
null,
{
tooltip: 'Click to link to',
type: 'text',
submit:'Ok',
cancel:'Cancel',
width: "100px"}
]
});;
});
$(function(){
$("select.multiselect").multiselect({
noneSelectedText: "- select one -",
header: false,
classes: "kw-wrapper fixed kwm-button",
multiple: false,
selectedList: 1
});
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题是您还必须将插件应用到新创建的元素。您可以像这样使用 fnDrawCallback() :
The problem is that you mustr apply the plugin also to the newly created elements. You could use fnDrawCallback() like this: