Forums

add class to parent ul of active menu (1 post)

  1. majestictreefrog
    Member
    Posted 1 year ago #

    So, I have a 3 or 4 layer deep menu (ul li). For any given active menu item, I want to have the branch around it visible, but not other branches.

    eg:

    ul li
    ul li - branch 1
    li
    li ul
    li - active page
    li
    ul li - branch 2
    /ul

    etc.

    Is there a way to set some sort of parent class on all parent uls?
    eg:
    ul li (parent)
    ul li - branch 1 (parent)
    li
    li ul (parent)
    li - active page
    li
    ul li - branch 2 (not a parent, do not show)
    /ul

    Or really, and plugin or anything that will add a richer set of classes to menu items so that I can get at them effectively with either jquery or CSS?

Topic Closed

This topic has been closed to new replies.

About this Topic