We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
.dataset
getAttribute(…)
1 parent da52861 commit 1c3355bCopy full SHA for 1c3355b
docs/assets/js/tabs.js
@@ -11,7 +11,7 @@ function activateTab(clickedButton, container) {
11
clickedButton.classList.add('active');
12
13
// Activate corresponding content
14
- const tabId = clickedButton.getAttribute('data-tab');
+ const tabId = clickedButton.dataset.tab;
15
const content = container.querySelector(`.tab-content[data-tab="${tabId}"]`);
16
if (content) {
17
content.classList.add('active');
0 commit comments