Hi,
I have a list of elements like
<ol>
<li class="blah">some text <a href=#">test</a></li>
<li class="blah">some text <a href=#">test</a></li>
<li class="blah">some text <a href=#">test</a></li>
<li class="blah">some text <a href=#">test</a></li>
<li class="blah">some text <a href=#">test</a></li>
<li class="blah">some text <a href=#">test</a></li>
<li class="blah">some text <a href=#">test</a></li>
<ol>
I want to add a hover element so when the user hovers over the <li> then only that items <a> hovers.
I have this (where hover-enabled is just a color)
jQuery('ol li').hover(function () {
jQuery('ol li.blah a').addClass('hover-enabled');
}, function () {
jQuery('ol li.blah a').removeClass('hover-enabled');
});
It works but ALL of the <a> items hover - not just the individual <li>. Any ideas ?