Merge pull request #25 from challgren/menucollapse

Find url in the nav menu and mark class as active
This commit is contained in:
David Miller
2014-12-28 17:15:24 -05:00
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');
}
});