My goal is to include a new class when hovering over the li
element using Angular in the code snippet below.
<li ng-mouseenter="cola-selected=true" class="pull-left" ng-class="{'selected' : cola-selected}">
<a href="interna.html">
<img src="assets/images/cola.png">
</a>
</li>
This page only requires this specific functionality, so I'm considering whether adding a new JavaScript file is necessary.
The desired behavior is for the li
element to have the new class selected
upon mouse hover. However, the provided code is not functioning correctly and I am unable to determine the reason why.
You can find an example of my code on this fiddle: https://jsfiddle.net/mjrmeffc/