我想隐藏数据表thead如果表没有任何数据.
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];
});
}
Run Code Online (Sandbox Code Playgroud)
我认为如果表没有任何数据隐藏thead有利于为用户显示任何消息,如何隐藏?