【发布时间】:2016-01-19 14:30:04
【问题描述】:
当用户应用过滤器并且没有找到记录时,我想隐藏我的数据表,我们可以设置自定义消息,但我的要求是隐藏这个表。下面是我的示例代码。我无法确定当找不到记录会隐藏表时哪个侦听器会提供帮助。
reportCardTbl = $('.standardDataTable').DataTable( {
"paging": false,
"scrollCollapse": true,
"paging": false,
"oLanguage": {
"sZeroRecords":function(){
//$(this) gives me TD, i tried to search $(this).parents("table").hide(); not working as TD is not in table
//here i want to hide table
}
}
} );
【问题讨论】:
标签: jquery datatables