I want to use the jQuery hover function and can do so with no problem.
$(".tag").hover(function() { $(this).addClass("tag-over"); }, function() { $(this).removeClass("tag-over"); });
However in some circumstances I will have already added the tag-over class due to a click event, but I don't want it remove when the user removes the mouse.
How do I only perform the addClass() and rmeoveClass() if the tag-over class is not already attached to the element.
Please let me know if that explanation is no good.
hasClass('classname')??