Adding hover CSS attributes via jQuery/Javascript
I find using mouseenter and mouseleave to be better than hover. There’s more control. $(“#somecontent”).mouseenter(function() { $(this).css(“background”, “#F00”).css(“border-radius”, “3px”); }).mouseleave(function() { $(this).css(“background”, “00F”).css(“border-radius”, “0px”); });