; link.closest('.list-group-item-action').classList.remove('active'); if (currentPath!="/" && linkPath === currentPath) { link.closest('.list-group-item-action').classList.add('active'); } });