954,566 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

use jquery to select nested <ul>

Hi
I am creating a drop down menu and i want to be able to select the elements that will be in the drop down list (the nested parts of my html list).

I want to do this so that when the user hovers over the visible part of the menu its is highlighted one colour. and then when the drop down menu, drops down, the options in it will be highlighted a different colour.

I am new to javascript and have been self teaching myself for the last month

Any help or suggestions much appreciated - i am thinking using a child selector but i have tried this with no luck $('ul > li').addClass('subnav')

Thanks

emilyhedgecock
Light Poster
32 posts since Feb 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: