jQuery select different DIV on hover
When hovering on one div, highlight a different div.
by enigmarm
HTML
<div id="a">This is a div</div>
<div id="b">This is another div</div>
CSS
div {
background-color: lightgray;
}
.yellow {
background-color: yellow;
}
JavaScript
$('#b').hover(
function(){ $('#a').addClass('yellow') },
function(){ $('#a').removeClass('yellow') }
)