blob: d14ca95086760f4d4dde979ab6fa1165575f5375 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
/// <reference path="scripts/jquery-3.5.1.min.js"/>
(function() {
function main() {
$.get('/navbar.html', function(pData) {
$('nav').html(pData);
const lPathName = window.location.pathname.length > 1 && window.location.pathname.startsWith('/') ? window.location.pathname.substr(1) : window.location.pathname;
$('nav').find('a[href="' + lPathName + '"').addClass('nav-selected');
});
}
$(document).ready(main);
})()
|