diff --git a/js/app.js b/js/app.js index 0c20be89..b68445b0 100644 --- a/js/app.js +++ b/js/app.js @@ -40,17 +40,9 @@ $('#dT').dataTable( { }); -//Highlight top nav menu item with current page +// Highlight the active nav link on side nav $(function() { - // Highlight the active nav link. var url = window.location.pathname; var filename = url.substr(url.lastIndexOf('/') + 1); - $('.navbar a[href$="' + filename + '"]').parent().addClass("active"); -}); - -$(function() { - // Highlight the active nav link. - var url = window.location.pathname; - var filename = url.substr(url.lastIndexOf('/') + 1); - $('.nav a[href$="' + filename + '"]').parent().addClass("active"); + $('.navbar-nav a[href$="' + filename + '"]').parent().addClass("active"); }); \ No newline at end of file diff --git a/side_nav.php b/side_nav.php index 2c95f1e9..81b9426b 100644 --- a/side_nav.php +++ b/side_nav.php @@ -1,6 +1,6 @@