I dynamically populate a ul by getting data from a DB and using a template engine (mustache) like so:
var template = '<ul class="myList"> {{#.}} ' +
'<li class="Foo" ' +
'style="background-color: {{thisItemsColor}};>" ' +
'{{someData}}' +
'</li> ' +
'{{/.}} </ul>';
The color of the list item is stored in the DB. The problem is now I want to change the hover attribute to a different color. I cannot do this via a css file because in the markup I'm setting that attribute directly on the element so I'm doing this:
.myList .Foo:hover {
background-color:#000033 !important;
}
Is this acceptable or should I use js/jquery to apply this pseudo selector?