In this plunk I have an Angular UI dropdown list with a class that attempts to change the color of the items in the list when the cursor is on the item (on hover)
I tried assigning a class to the <li>
on hover and it doesn't work. Setting the class without on hover does work.
This is the attempt:
CSS
li.ddl-li {
background-color:yellow; /* works */
}
li.ddl-li:hover {
background-color:orange; /* doesn't work */
}
HTML
<div class="btn-group" uib-dropdown>
<button id="btn-append-to-body" type="button" class="btn btn-primary"
uib-dropdown-toggle="">{{selection}} <span class="caret"></span>
</button>
<ul class="dropdown-menu" ng-click="selectItem($event)" uib-dropdown-menu=""
role="menu" aria-labelledby="btn-append-to-body">
<li role="menuitem" class="ddl-li">
<a href="#" data-value="1" >The first item</a>
</li>
<li role="menuitem" class="ddl-li">
<a href="#" data-value="2">Another item</a>
</li>
<li role="menuitem" class="ddl-li">
<a href="#" data-value="3">Yet another item</a>
</li>
</ul>
</div>