komal
komal

Reputation: 9

vertical-dropdown-css

what I need to look for is to only show the top level pages, unless a top level page is clicked on, then I want it to show the sub pages that go under just that one top level page that was clicked.i want that to be done in css. when parent page is clicked then i want the drop down menu to be shown.am doing it in vertical menus.i want it to be shown like this way:

Parent #1

Parent #2

Parent #3

Parent #4

when parent 1 is just clicked it should go like this:

Parent #1

Parent #2

Parent #3

Parent #4

Upvotes: 1

Views: 353

Answers (2)

Ajay Patel
Ajay Patel

Reputation: 5418

As i can see in your case you need to add menu class (i.e menu).

wp_nav_menu( array(
    'menu_class' => 'menu',
    'theme_location' => 'secondry-nav',
    'container' => ''
) );

and make changes in your css to apply styling to the class selector rather than the id selector (change #menu to .menu)

Upvotes: 0

Ajay Patel
Ajay Patel

Reputation: 5418

Have look to this js fiddle . I think this will help you.

What you need to do is to use jQuery horizontal accordion menu.

Upvotes: 1

Related Questions