Skip to content

Commit

Permalink
made index show active when on root page
Browse files Browse the repository at this point in the history
  • Loading branch information
snollygolly committed Apr 15, 2016
1 parent 7e9b5e4 commit a37c1ea
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions javascripts/custom/active-link.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
$(document).ready(function () {
if (location.pathname != "/modules")
if (location.pathname == "/t2-start/") {
var navLink = "a[href*='" + location.pathname + "index.html']";
} else {
var navLink = "a[href*='" + location.pathname + "']";
$(navLink).addClass("currentlink");
$(navLink).parent("li").addClass("active");
}
$(navLink).addClass("currentlink");
$(navLink).parent("li").addClass("active");
});

0 comments on commit a37c1ea

Please sign in to comment.