I have the following JS code:
var theme_list_open = false;
var aurl = window.location.href; // Get the absolute url
$('li a').filter(function() {
$(this).prop('href') === aurl;
if (theme_list_open == true) {
$("ul li ul").hide();
theme_list_open = false
} else {
$("ul li ul").show();
theme_list_open = true
}
return
}).parent('li').addClass('active');
But I do not know what is happening, because when I enter a link what it does is that all child-list
activates them, that is:
Usuario (link Principal)
ingresar usuario (link hija)
actualizar usuario (link hija)
borrar usuario (link hija)
Departamento (link Principal)
ingresar dpto (link hija)
actualizar dpto (link hija)
borrar dpto (link hija)
It happens that doing click
in any link
will immediately display all the links
that depend on a link padre
...
I hope you have made me understand and I would appreciate the collaboration.