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.
1 parent 070a695 commit 1007117Copy full SHA for 1007117
static/js/page.js
@@ -0,0 +1,11 @@
1
+document.addEventListener('DOMContentLoaded', function() {
2
+ const mainNavHashLinks = document.querySelectorAll(
3
+ 'rh-navigation-primary-item[href^="#"], rh-navigation-primary-item > a[href^="#"]'
4
+ );
5
+
6
+ for (let hashLink of mainNavHashLinks) {
7
+ hashLink.addEventListener('click', function() {
8
+ hashLink.closest('rh-navigation-primary').close();
9
+ });
10
+ }
11
+});
templates/index.html
@@ -116,6 +116,7 @@ <h3 class="header">{{ elem.heading }}</h3>
116
117
{% include "partials/_footer.html" %}
118
119
+<script src="/js/page.js"></script>
120
<script src="/js/table-search.js"></script>
121
<script src="/js/rht-picture.js"></script>
122
0 commit comments