Accordion Menu / Posts /

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

19
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> amenu.open("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
Tom  11 years ago   viewed: 9420    

4 Answers

1
Tom,
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   11 years ago
1
Thank you Milo...it worked like a charm. I definitely appreciate your excellent support in addition to your excellent product.

Best Regards,

Tom
Tom
  11 years ago
0

Hi,

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   8 years ago
0

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

Milo   8 years ago

   

Your name*
Password
(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: