I currently have left side menus.
<div class="panel">
<div class="panel-heading panel-red" role="tab" id="headingDash" style="">
<a role="button" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseDash" aria-expanded="true" aria-controls="collapseDash" class="menuList" style="">
<i class="fa fa-dashboard" style=" padding: 15px;color: #fff"></i>
Dashoboard
</a>
</div>
<div id="collapseDash" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingDash">
<div class="panel-body">
<ul class="nav">
<li class="subMenuList active" style=" ">
<a href="#" style="">Dashboard-1</a>
</li>
<li class="subMenuList" style="">
<a href="#" style="">Dashboard-2</a>
</li>
</ul>
</div>
</div>
</div>
My goal is to showcase the active main menu and sub menus upon click. I have successfully implemented this for static main menu and sub menus.
Here is my Fiddle link: https://jsfiddle.net/whv76xd0/6/
How can I achieve this dynamically on click?