<ul>
<li><a href="">link 1</a></li>
<li><a href="">link 2</a></li>
<li><a href="">link 3</a>
<ul>
<li><a href="">link 1</a></li>
<li><a href="">link 2</a></li>
</ul>
</li>
</ul>
How to add class to the immediate children 'a' of the LI, while on hover of the LI.
while i mouse out of the LI. the class should be removed.
I am trying to write following code for this.
$('.nice-menu li').mouseover(function(){
$(this).children('a' , 'span a')
}) ;