Fixes #18 and removes all nav classes with active since the javascript will automatically add them based on the url.

This commit is contained in:
Chris Hallgren
2014-12-24 22:44:34 -06:00
parent 7cb35d90be
commit 6aa0323eb9
12 changed files with 29 additions and 21 deletions

View File

@@ -25,4 +25,12 @@ $(function() {
$("#page-wrapper").css("min-height", (height) + "px");
}
});
var url = window.location;
var element = $('ul.nav a').filter(function() {
return this.href == url;
}).addClass('active').parent().parent().addClass('in').parent();
if (element.is('li')) {
element.addClass('active');
}
});