123456789101112131415161718192021222324 |
- let over = document.querySelector('.infoContent .tab-content').offsetHeight+100;
- window.addEventListener('scroll', fixedOnOver);
-
- const navCollapse = document.querySelector('#nav-collapse');
-
- function fixedOnOver() {
- if(window.pageYOffset >= over){
- navCollapse.classList.add('sticky');
- } else {
- navCollapse.classList.remove('sticky');
- }
- }
- checkTab()
- $('.infoContent .nav-item-link').click(checkTab);
- function checkTab() {
- if($('#pills-intro-tab').hasClass('active')) {
- $('.likeSee').attr('hidden', false)
- } else {
- $('.likeSee').attr('hidden', true)
- }
- }
|