I have an ordered list:
<ol id="selectable">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
</ol>
when I hover over an item I want it to have some sort of highlight therefore I have:
#selectable li:hover
{
/* some style */
}
with JavaScript I gave those list items the attribute that when clicked they change the style. so if I click on Item 4 for example it will have a red background color.
now how can I disable the hover style if the element happens to be with the style ckicked (red background)?
In other words I don't want :
#selectable li:hover
{
/* some style */
}
to apply on li that are selected... how can I do that?