i am having a problem in a hover LI that he hover all the li´s and not the one i have hovering.
html:
<div id="lista">
<ul>
<li>
<a href="#">content1</a>
<div class="slide">hide content1</div>
</li
<li>
<a href="#">content2</a>
<div class="slide">hide content2</div>
</li>
</ul>
</div>
javascript:
$('#lista li ').hover(function () {
$('.slide').slideDown('slow');
}, function () {
$('.slide').slideUp('fast');
});
});
Explanation: Each time you hover a
#lista lielement, you have to refer to its children.slideelement . If you just do $(‘.slide’), it means that you are referring to each.slideelement in the whole document 😉