Accordion Menu / Posts /

How do you have a menu item selected when using amenuopen?

Accordion Menu is a GREAT piece of code. Thank you for creating it! I am a very happy customer with this and all of your other products that I use.

I have one question:

I am using "<script>"li4b", true); </script>" to open a specific menu from a page whose URL is not in the menu structure. The script causes the correct menu to open; however, it does not show the specific list item in that menu as being selected.

Is it possible to do this? If so, how?

Thank you,

Tom  4 years ago   viewed: 5393    

4 Answers

There are two solutions:
1. HTML markup approach: Add a class="current" to the menu item's link: <a href="..." class="active">...</a>
or 2. JavaScript approach: Add a script to add the current class to the link(anchor) element. 
Milo   4 years ago
Thank you worked like a charm. I definitely appreciate your excellent support in addition to your excellent product.

Best Regards,

  3 years ago


I have same problem.

I try this :

<li><a href="" class="current">test</a></li>

but it doesn't work ( do nothing ) , any idea please ?

St   one year ago

The recent update has changed the current class to active. So you need to set it to class="active" instead.

Milo   one year ago


Your name*
(Optional. Used to modify this post afterwords)
+ =  

Ask your Own Question

  • If your question is related to the topic of this post, you can post your question to this page by clicking the "Post a reply" button at left;

  • When you want to start a new page for your question: