Skip to content

Commit 72c4deb

Browse files
authored
docs: explain hashlink JS for main navigation
1 parent 1007117 commit 72c4deb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

static/js/page.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ document.addEventListener('DOMContentLoaded', function() {
33
'rh-navigation-primary-item[href^="#"], rh-navigation-primary-item > a[href^="#"]'
44
);
55

6+
// Close dropdowns after clicking an in-page link on mobile viewports
67
for (let hashLink of mainNavHashLinks) {
78
hashLink.addEventListener('click', function() {
89
hashLink.closest('rh-navigation-primary').close();

0 commit comments

Comments
 (0)