Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Links active in an accordion Reply To: Links active in an accordion

#180722
Paulie_D
Member

i dunno…it seems that you switched requirements in there somewhere.

Frankly, I think you should break this down into separate functions.

Your first example had the toggle down fine…no need to change it.

Also, you have the ‘active_page’ link thing most of the way there…leave that too.

So the only thing you need to do is get the third function….open the sub-menu accordion if it contains an anchor with the active page class.

It shouldn’t be that hard.

Now, eventually, you might be able to combine no.2 and no.3 but that something for another day.