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 79b8107 commit ec7904bCopy full SHA for ec7904b
src/assets/js/app.js
@@ -6,11 +6,15 @@ $(() => {
6
// highlight.js
7
hljs.highlightAll();
8
9
- $("#navigation").load(`${config.rootPath}navigation.html`, function() {
10
- $(".sidebar-sticky .icon").on("click", function (e) {
11
- $(this).siblings("ul").toggle();
+ $("#navigation").load(`${config.rootPath}navigation.html`, () => {
+ // Toggle child lists
+ $(".sidebar-sticky .icon").on("click", function () {
12
+ // FIXME: use vanilla JS and CSS instead of jQuery
13
+ $(this).siblings("ul").toggle(500);
14
this.classList.toggle("icon-opened");
15
});
16
+
17
+ // Activate current page
18
$(`.sidebar-content a[href='${window.location.pathname}']`)
19
.attr("class", "active-link")
20
.parents('ul')
0 commit comments