Can I add css property to elements hover state.
I know how to add background to an element, what I need is to add background to an elements :hover state.
I have a <div class="myDiv"></div>
I can add css background $('.myDiv').css('background', 'red');
When using ('.myDiv').hover((function(e) { $(this).css('background', 'red'); the background changes on hover, but it stays this way even when not hovering over element.
Any ideas?
:hoverselector?:hoverselector or add/remove classes.