diff options
| author | Marin Ivanov <[email protected]> | 2024-08-20 15:36:06 +0300 |
|---|---|---|
| committer | Marin Ivanov <[email protected]> | 2024-08-20 15:36:06 +0300 |
| commit | da5fd96e5e9364a6ae26a9a2ffe5dad294d93ec7 (patch) | |
| tree | 5f01e0d1cffe61500f2cd23108e5ea44705aaa2c /app.js | |
| parent | 0c24aba5dd6b7804ba63d596e3ae692fccb68e88 (diff) | |
fix hash handling
Diffstat (limited to 'app.js')
| -rw-r--r-- | app.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -97,8 +97,8 @@ const routes = { p("The requested page is not available.") ), }; -const onchange = () => { - doc.querySelectorAll('nav a').forEach(x => x.$cls((location.href===x.href)?"active":"")); +const onchange = (h) => { + doc.querySelectorAll('nav a').forEach(x => x.$cls(x.attr("href")===h?"active":"")); loading(isLoading); }; |
