Make JS a bit simpler
[plack-app-gruntmaster.git] / js / 90-nav.js
index 03dcb8257931dff52d9775d8aea71e2bd23a8db5..36aec02c3b8c9b9229b6129778e78ba3fb9db93d 100644 (file)
@@ -9,8 +9,8 @@ const NAVS = {
 };
 
 $(function(){
-       let path = location.pathname;
-       for (let nav in NAVS)
+       const path = location.pathname;
+       for (const nav in NAVS)
                if(path.match(NAVS[nav]))
-                       $('#nav-' + nav)[0].classList.add('active');
+                       q('#nav-' + nav).classList.add('active');
 });
This page took 0.009498 seconds and 4 git commands to generate.