From 211d896298df00e533fbc15e4081285374fec1bc Mon Sep 17 00:00:00 2001 From: chiu Date: Thu, 19 Aug 2021 22:18:17 +0800 Subject: [PATCH] fix error --- modules/member/show.html.erb | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/modules/member/show.html.erb b/modules/member/show.html.erb index cda8c07..882a89b 100644 --- a/modules/member/show.html.erb +++ b/modules/member/show.html.erb @@ -75,12 +75,16 @@ for ( var i = 0; i < $('tr[data-list="pd_title"]').length ; i++ ) { } } } - -$('.tab-pane table').DataTable({ - searching: false, - paging: false, - ordering: false, - info: false, - order: false +$('.tab-pane table').each(function(){ + if($(this).find('thead').length!=0 && $(this).find('td').length!=0 && !$(this).hasClass('dataTable')){ + $(this).DataTable({ + searching: false, + paging: false, + ordering: false, + info: false, + order: false, + autoWidth: false + }); + } });