I need to define a div\'s background color on :hover with jQuery, but the following doesn\'t seem to work:
$(\".myclass:hover div\").css(\"background-color\
You can try this:
$(".myclass").mouseover(function() { $(this).find(" > div").css("background-color","red"); }).mouseout(function() { $(this).find(" > div").css("background-color","transparent"); });
DEMO