Skip to content

Commit 1c3355b

Browse files
committed
docs: Use .dataset over getAttribute(…)
1 parent da52861 commit 1c3355b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/assets/js/tabs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function activateTab(clickedButton, container) {
1111
clickedButton.classList.add('active');
1212

1313
// Activate corresponding content
14-
const tabId = clickedButton.getAttribute('data-tab');
14+
const tabId = clickedButton.dataset.tab;
1515
const content = container.querySelector(`.tab-content[data-tab="${tabId}"]`);
1616
if (content) {
1717
content.classList.add('active');

0 commit comments

Comments
 (0)