Fixed tabs when there are several groups of tabs in the same page

This commit is contained in:
Javier Eguiluz 2015-11-10 11:20:15 +01:00
parent 0fc513e611
commit c5daff0143

View File

@ -359,6 +359,8 @@
activeTab = activeTab.parentNode; activeTab = activeTab.parentNode;
} }
/* get the full list of tabs through the parent of the active tab element */
var tabNavigation = activeTab.parentNode.children;
for (var k = 0; k < tabNavigation.length; k++) { for (var k = 0; k < tabNavigation.length; k++) {
var tabId = tabNavigation[k].getAttribute('data-tab-id'); var tabId = tabNavigation[k].getAttribute('data-tab-id');
document.getElementById(tabId).className = 'hidden'; document.getElementById(tabId).className = 'hidden';