Reputation: 4160
my issue is: Can I apply a background-image to a selectioned <li>
that contain a link, only by css? Now by this:
.art-block li:hover , .art-block li:visited
{
background-color:red !important;
}
I can only apply a background when mouse is over the link but if I move the mouse background desappear.
Upvotes: 1
Views: 103
Reputation: 6805
I don't know a only CSS way but here is the JQuery way:
$("li").click(function(){
$(".selected").removeClass("selected");
$(this).addClass("selected");
});
Upvotes: 1