Topic: Classic Tabs are not working in IE

kimfreesland pro asked 6 years ago


Hello there, I wanted to see if there is a possible way to get my Classic Tabs working in IE.   Thank you so much--everything else is working awesome!

Mikołaj Smoleński staff answered 6 years ago


Hello, Please add the following code to Your scripts :
$(document).ready(function() {
 var navItems = document.querySelector('.nav.nav-tabs').children;
 var tabPanes = document.querySelectorAll('.tab-pane');
 for(let i=0; i < navItems.length; i++) {
 navItems[i].addEventListener('click', navItemClick);
 }
 
 function navItemClick() {
 for(let i=0; i < navItems.length; i++) {
 navItems[i].children[0].classList.remove('active');
 tabPanes[i].classList.remove('in');
 tabPanes[i].classList.remove('show');
 tabPanes[i].classList.remove('active');
 console.log(tabPanes[i]);
 }
 this.children[0].classList.add('active');
 let attr = this.children[0].getAttribute('href');
 $(attr).addClass('in show active');
 }
 });
Regards

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags