I have a ul with 2 li's in there, and a local map. if the user hovers on one of the li's the map lights up on of the regions, when the user hovers on one of the regions the corresponding li should light up.
It actually works, but it doesn't work for a 100%, the only one thing that changes is the padding, but the color doesn't change and the list style doesn't change.
<ul>
<li id="selector1"><a href="#">area 1</a></li>
<li id="selector2"><a href="#">area 2</a></li>
</ul>
$(function() {
$('#area-1').hover(function() {
$('#selector-1').css({
'list-style':'square',
'padding':'.5em 0',
'color':'#0a6480',
});
}, function() {
// on mouseout, reset the color
$('#selector-1').css({
'list-style':'none',
'padding':'.2em 0',
'color':'#FFF'
});
});
});
#area-1? Are#selector-1andid="selector1"supposed to be the same (mismatched hyphen)? A working example that demonstrates the issue would be best.