javascript - Automatically Add Class To Subchild & Parent LI With jQuery -
i have been searching hours solution problem , none of them seem work way like. need jquery automatically add class "active" main li , child li if on page. first code block simple structure, second code block how needs if on "billing_forecast.php" page. <aside id="sidebar"> <!--| main menu |--> <ul id="side-menu" class="side-menu"> <li> <a href="index.php"> <i class="zmdi zmdi-home"></i> <span>home</span> </a> </li> <li class="sm-sub sms-bottom"> <a href=""> <i class="zmdi zmdi-money zmdi-hc-fw"></i> <span>billing</span> </a> <ul> ...