Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update assets/js/tabs.js based on suggested change
Using const for objects

Co-authored-by: Niels Bauman <33722607+nielsbauman@users.noreply.github.com>
  • Loading branch information
theangryhobbit and nielsbauman authored Apr 1, 2021
commit 372f442a3bbe958e8b01814ee07660eeb3840ee6
5 changes: 3 additions & 2 deletions assets/js/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ window.addEventListener('load', function () {
}

removeActiveClasses(ulTab);
tabContentId = ulTab.getAttribute('data-tab');
tabContentElement = document.getElementById(tabContentId);
const tabContentId = ulTab.getAttribute('data-tab');
const tabContentElement = document.getElementById(tabContentId);

removeActiveClasses(tabContentElement);

tabContentElement.querySelectorAll('li')[position].classList.add('active');
Expand Down