Menu icon Foundation
Equivalent of collapse

Hi, coming from bootstrap I could do something like,

$this.find("li.active").has("ul").children("ul").collapse("show");

is there an equivalent method available in foundation?

Thanks for your time.

Dan

collapseaccordion

Hi, coming from bootstrap I could do something like,

$this.find("li.active").has("ul").children("ul").collapse("show");

is there an equivalent method available in foundation?

Thanks for your time.

Dan

Lyn over 5 years ago

Hey there,

I don't know what you're looking for, but if you simply want to show/collapse the topbar on small screens, you can do this :

    Foundation.libs.topbar.toggle();

If that's not what you want, could you please specify what it should be doing ?

Regards,

Lyn.

Drsii over 5 years ago

Hi Lyn,

I am converting http://demo.onokumus.com/metisMenu/ to work with foundation. it's only real dependency is that bootstraps collapse.js which essentially does the same as foundations accordion.

Lyn over 5 years ago

Hey Dan,

If you're already using accordions, you could trigger a click on the link I guess (I don't think there's any built-in methods to do it).

Did you take a look at the MTREE plugin : http://foundation.zurb.com/forum/posts/17104-plugin-mtree-menu ?
You may find there an answer for your case (take a look at the js in codepen).

Regards,

Lyn.