/* Read the with information about ul and li to active */ const navbar_active = $("#nav_actived").html(); const navbar_active_split = navbar_active.split(','); const ul_active = navbar_active_split[0]; const a_active = navbar_active_split[1]; /* Open the ul */ $("#" + ul_active).addClass("show"); /* Active the li */ var sublink_activate = $("#" + a_active); sublink_activate.addClass("sublink_activate");