How to make menu item active when clicking on menu item and content page open then highlight particular class their sub class
<ul class="nav">
<li class="has-sub active">
<a href="javascript:;">
<b class="caret pull-right"></b>
<i class="fa fa-laptop"></i>
<span>Dashboard</span>
</a>
<ul class="sub-menu">
<li class="active"><a href="index.aspx">Dashboard v1</a></li>
<li><a href="index_v2.aspx">Dashboard v2</a></li>
</ul>
</li>
<li class="has-sub">
<a href="javascript:;">
<span class="badge pull-right">10</span>
<i class="fa fa-inbox"></i>
<span>Email</span>
</a>
<ul class="sub-menu">
<li><a href="email_inbox.aspx">Inbox v1</a></li>
<li><a href="email_inbox_v2.aspx">Inbox v2</a></li>
</ul>
</li>
<li class="has-sub">
<a href="javascript:;">
<b class="caret pull-right"></b>
<i class="fa fa-suitcase"></i>
<span>UI Elements</span>
</a>
<ul class="sub-menu">
<li><a href="ui_general.aspx">General</a></li>
<li><a href="ui_typography.aspx">Typography</a></li>
</ul>
</li>
</ul>