treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Jquery drop down menu make ul stay selected

  • Hello everyone,

    I am developing a website with jquery drop down menus.

    I have the ul in a horizontal menu with text links once hovered the link is highlighted with a background color & drop down pops up. But if i move my mouse down on teh drop down menu links the top link is no longer highlighted.

    is there a way to make teh top links stay highlighted with background color even when i move my cursor down to the links in drop down?

    Would appreciate some help.
  • Simply give the parent anchor element a class of active or current and when you roll off simply remove that class, easiest way to do it.
  • that's done with simple css:
    http://jsfiddle.net/F8xDT/