Accordion Menu / Posts /

if the same link appears multiple times how can I mandate which link is shown as selected

1425
I have a link that appears under two different categories. It seems that only the second instance of the link is being seen as the real link for what AccordianMenu considers as the "selected" link. I can't seem to override this, aside from removing the second link instance. Any suggestions or thoughts for why this would be happening?
mike  11 years ago   viewed: 23380    

3 Answers

1
Use the menu's built-in function open(). For details please read:
http://www.menucool.com/vertical/accordion-menu#view3
Milo   11 years ago
0

To mandate which instance is recognized as selected, you can try:

  1. Assign unique identifiers (IDs) to each link instance, then modify the selection logic to recognize the ID of the desired link. 
  2. Ensure that your CSS or JavaScript specifically targets the first instance using attributes like nth-of-type or nth-child.
  3. Explicitly set the "selected" state in your code for the preferred link.
    http://www.menucool.com/vertical/accordion-menu#that's not my neighbor
labelspaniel   3 months ago
0

Here are some suggestions to manage which link is shown as selected in AccordionMenu:

  1. Use Unique IDs: Ensure each link has a unique ID, even if they belong to different categories. This helps to differentiate them.

  2. Change the selected Property: Check if you can set the selected property for the link you want to display as the selected link.

  3. Use a Callback: If the library supports it, consider using a callback function to determine which link should be considered "selected."

  4. Customize CSS: If you can't change the logic of AccordionMenu, you might use CSS to highlight the link you want.

  5. Other information here: http://www.menucool.com/vertical/accordion-menu#view3 time calculator

brianallen
  5 days 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: