That depends upon which element has the ID or class that you're hoping
to select, for instance, if you have:
<ul>
   <li><a class="test-class">List Item Text</a></li>
</ul>

or

<ul id="nav-menu>
   <li><a>List Item Text</a></li>
</ul>

Then you would want

$("a.test-class").hover(...);
or
$("#nav-menu li a").hover(...);

respectively.

On Jan 14, 8:53 pm, J <jesseparent...@gmail.com> wrote:
> Hi,
>
> Im new to jquery.
>
> I have a .hover that is applied to all ul li a
> $("ul li a").hover
>
> Question: How can I apply the .hover to a specific class or id?
>
> I tried something like this but it didn't work for me:
> $("#test ul li a").hover
> $("test ul li a").hover
>
> Thanks

Reply via email to