+ event.target.classList.add('active');
+
+ // Toggle section
+ const showInfo = (tab === 'info');
+ this.elem.classList.toggle('show-info', showInfo);
+
+ // Set the scroll position from cache
+ const pageHeader = document.querySelector('header');
+ const defaultScrollTop = pageHeader.getBoundingClientRect().bottom;
+ document.documentElement.scrollTop = this.scrollCache[tab] || defaultScrollTop;
+ setTimeout(() => {
+ document.documentElement.scrollTop = this.scrollCache[tab] || defaultScrollTop;
+ }, 50);
+
+ this.lastTabShown = tab;