Sorry I'm new to this. I have a problem with selecting an element inside my nav list
<ul class="subnav">
<li><a href="#">Link 1</a><span class="sub">Description 1</span></li>
<li><a href="#">Link 2</a><span class="sub">Description 2</span></li>
<li><a href="#">Link 3</a><span class="sub">Description 3</span></li>
</ul>
I'm looking to create a function that when a user hovers on Link 1, only Description 1 text should appear.
Below is my JQUERY
$('ul.subnav li a').hover(function() {
$('.sub').animate({opacity: "show", top: "5"}, "slow");
}, function() {
$('.sub').animate({opacity: "hide", top: "-5"}, "slow");
});
The problem I am having is when a user hover on any link, all of the description text will appear. How can I tell JQUERY to show only the Description on where the mouse is hovered?
Thanks much.