From 376e1a7f9207fffb1ec3027ac1e7f32db5de4922 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Sat, 6 Feb 2021 18:39:48 -0500 Subject: Initial commit --- frontend/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 frontend/index.js (limited to 'frontend/index.js') diff --git a/frontend/index.js b/frontend/index.js new file mode 100644 index 0000000..0cbd896 --- /dev/null +++ b/frontend/index.js @@ -0,0 +1,10 @@ +/// + +function main() { + console.log('Document ready.'); + const lPathName = window.location.pathname.length > 1 && window.location.pathname.startsWith('/') ? window.location.pathname.substr(1) : window.location.pathname; + console.log(lPathName); + $('nav').find('a[href="' + lPathName + '"').addClass('nav-selected'); +} + +$(document).ready(main); \ No newline at end of file -- cgit v1.2.1