diff --git a/src/main/webapp/static/global/scripts/common.js b/src/main/webapp/static/global/scripts/common.js index cabd9b5d0..b86bbc896 100644 --- a/src/main/webapp/static/global/scripts/common.js +++ b/src/main/webapp/static/global/scripts/common.js @@ -600,18 +600,21 @@ window.onload=function(){ heightDiv(); },500); - var tableCont = document.querySelector('.table-responsive'); - function scrollHandle (e){ - console.log(this); - var scrollTop = this.scrollTop; - $('th').css('transform','translateY(' + scrollTop + 'px)'); - $('thead tr').css('z-index','2147482468'); - $('thead tr').css('position','relative'); - $('th').css('border','1px solid rgb(255, 255, 255)'); - $('th').css('background-clip','padding-box'); - } - tableCont.addEventListener('scroll',scrollHandle); - $('#contentTable').attr("margin-top",'0px'); + if($('.table-responsive')){ + var tableCont = document.querySelector('.table-responsive'); + if(tableCont !=null && tableCont!=''){ + function scrollHandle (e){ + var scrollTop = this.scrollTop; + $('th').css('transform','translateY(' + scrollTop + 'px)'); + $('thead tr').css('z-index','2147482468'); + $('thead tr').css('position','relative'); + $('th').css('border','1px solid rgb(255, 255, 255)'); + $('th').css('background-clip','padding-box'); + } + tableCont.addEventListener('scroll',scrollHandle); + $('#contentTable').attr("margin-top",'0px'); + } + } } var setInterceptDefaultInfo=function(cfgId){ var action=$("input[name='action']:checked").val();