Commit 20b623c9 authored by Kevin Yumang's avatar Kevin Yumang

SERV-2286 - optimized navigation.js

parent 83cb97f6
...@@ -4,12 +4,14 @@ $(document).ready(function() { ...@@ -4,12 +4,14 @@ $(document).ready(function() {
$('.sidebar-content .nav-link').each(function () { $('.sidebar-content .nav-link').each(function () {
let element = $(this);
if(currentWindowPath === '') currentWindowPath = '/'; if(currentWindowPath === '') currentWindowPath = '/';
if (currentWindowPath == $(this).attr('href')) { if (currentWindowPath == $(this).attr('href')) {
$(this).addClass('active') element.addClass('active')
$(this).parents('.nav-item-submenu').addClass('nav-item-open'); element.parents('.nav-item-submenu').addClass('nav-item-open');
$(this).parents('.nav-group-sub').css("display", "block"); element.parents('.nav-group-sub').css("display", "block");
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment