0
我試圖用DataTables Bootstrap與jQuery ui一起使用。在我的表格單元格內部,我有超鏈接打開對話框模式框以編輯要發送到數據庫的不同輸入字段。在表格加載時,這些動作會正常觸發,但如果使用表格的排序或分頁功能,那麼這個動作就會中斷,並且我會得到原始的Html輸出。 該表得到與初始化以下DataTables Bootstrap和jQuery UI對話框
/* Table initialisation */
$(document).ready(function() {
$('#example').dataTable({
"sDom": "<'row'<'span8'l><'span12'f>r>t<'row'<'span6'i><'span6'p>>",
"sPaginationType": "bootstrap",
"oLanguage": {
"sLengthMenu": "_MENU_ records per page"
},
"oTableTools": {
"aButtons": [
"copy",
"print",
{
"sExtends": "collection",
"sButtonText": 'Save <span class="caret" />',
"aButtons": [ "csv", "xls", "pdf" ]
}
]
}
});
});
比在另一個js文件,我試圖抓住jQuery UI的事件
$(document).ready(function() {
var dialog = $('#tabs').tabs(
{
select: function(ev, ui) {
//Setup Buttons to each Tab
switch(ui.index) {
case 0:
$('.ui-dialog-buttonpane').find("button").show().filter(":contains('Email senden')").hide();
break;
case 1:
$('.ui-dialog-buttonpane').find("button").show().filter(":contains('Speichern')").hide();
break;
case 2:
$('.ui-dialog-buttonpane').find("button").hide();
break;
}
}
}).dialog({ //codes});
});
感謝您的反饋意見。我將開始重構我的代碼來嘗試一下你的建議。 – fefe
幾周後返回到這個問題我有以下問題。我可以得到source.id的值。這應該是每列的第一個單元格。如果我提醒洞穴來源,我會看到檢索到的數據 – fefe