I am using a slightly adapted version of a mootools nested accordion
from here:
http://blog.medianotions.de/en/articles/2008/mootools-nested-accordion

I have it working as needed as regards opening the nested elements
(can't get them to close yet but that is a different matter)
However I have a problem which I can't seem to solve.
The togglers can and do contain links that will link to real pages (I
am using the accordion for a menu).  The problem is that when you
click on them the accordion starts to open until the page changes
causing undesirable flicker (depending on the time it takes the page
to change).

So, what I need to do is stop the accordion from being toggled when
these links are clicked on.

Is there any way that I can stop elements (hrefs) contained within the
toggler element from intiating it when they are clicked on?

I have set up a slimmed down demo of me code here (the full code also
detects the current page and opens the menu at the correct position):
http://mooshell.net/VhXb3/7

You will see that I have added a check on all the "hrefs" within the
accordion but at the moment it does nothing more than show a message -
this is the action that I need to modify to stop the toggling.

Any help, pointers etc would be greatly apreciated.
Of course if anyone has any alternative methods for achieving my
nested dropdown menu I would also be interested ;)

Thanks in advance

Chris

Reply via email to