如果表没有任何数据,我想隐藏数据表标题。
oTable_topics =$('#showTopics').dataTable({
"bLengthChange": false,
"bStateSave": true,
"iDisplayLength": 12,
"bScrollCollapse": true,
"bJQueryUI": true,
"bAutoWidth": false,
"sAjaxSource": "server_processing.php",
"sPaginationType": "full_numbers",
"bProcessing": true
});
function clickRowHandler_topics() {
$('#showTopics tbody tr').bind('click', function () {
var aData = oTable_topics.fnGetData( this );
iId_topics = aData[1];
});
}
我认为如果表格没有任何数据隐藏,那么可以为用户显示任何消息,如何隐藏它?
最佳答案
试试这个:
"fnDrawCallback": function ( oSettings ) {
$(oSettings.nTHead).hide();
}
关于jQuery 数据表隐藏头部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16802753/