Forums - C# Corner

Forum guidelines
Rakesh Singh

Rakesh Singh

  • 1.7k
  • 57
  • 2.5k

Need Li item active

Jul 23 2018 6:56 AM
I need to keep active the li Item after the clicking on ul(id+ tree3).
 
Issue is when click on the ul and again click on ul then page is still opened the same but li is not remaining active. Please help
 
code is as given below:
 
<ul class="nav side-menu " id="tree3">
<li ng-class="{'active': currentState == 'add_new_campaign'}" style="background-color: #01AE9D;border-bottom-left-radius: 5px;border-bottom-right-radius: 5px;"
class="active campaignCentral">
<a id="cdnaAnchor" class="sep">
<span>
<i class="fa fa-plus-square-o"></i>CDNA</span>
<span id="arrowImage" class="fa fa-chevron-circle-down"></span>
</a>
<ul t-ng-resize class="nav child_menu">
<li ng-class="currentState == 'individual' ? 'active':''" class="parentLi">
<a ui-sref="individual" data-toggle="tab">
<i class="fa fa-street-view" aria-hidden="true"></i>&nbsp;&nbsp;<span data-ng-show="!resized">Customer View</span>
</a>
</li>
<li ng-class="currentState == 'segment' ? 'active':''" class="parentLi">
<a ui-sref="segment" data-toggle="tab">
<i class="fa fa-pie-chart" aria-hidden="true"></i>&nbsp;&nbsp;<span data-ng-show="!resized">Segment View</span>
</a>
</li>
<li ng-class="currentState == 'merchant' ? 'active':''" class="parentLi">
<a ui-sref="merchant" data-toggle="tab">
<i class="fa fa-users" aria-hidden="true"></i>&nbsp;&nbsp;<span data-ng-show="!resized">Merchant View</span>
</a>
</li>
<li ng-class="currentState == 'product' ? 'active':''" class="parentLi">
<a ui-sref="product" data-toggle="tab">
<i class="fa fa-sitemap" aria-hidden="true"></i>&nbsp;&nbsp;<span data-ng-show="!resized">Product View</span>
</a>
</li>
<li ng-class="currentState == 'dashboard' ? 'active':''" class="parentLi">
<a ui-sref="dashboard" data-toggle="tab">
<i class="fa fa-desktop" aria-hidden="true"></i>&nbsp;&nbsp;<span data-ng-show="!resized">Exec Dashboard</span>
</a>
</li>
</ul>
</li>
</ul>
 
My UI is as given below:
 
So while I am clicking on CDNA, the li will wrap and when clicking again then the segment will not remain active but it should remain active

Answers (2)