简体   繁体   中英

Foundation for Apps, off canvas close on click off

I'm using Foundation for Apps, the angular version, and trying to use the off canvas menu. It works fine, opening and closing via setting links, but does not close when clicking off of it in the main content area like previous versions, and their example, do.

It's a really simple setup:

<zf-offcanvas id="menu" position="left">
<a zf-close="" class="close-button">×</a>

</zf-offcanvas>
<a zf-open="menu" class="button">Open Off-canvas</a>

And it should be done, but clicking anywhere on the main content (not the links) does not close the off canvas like their example docs:

http://foundation.zurb.com/apps/docs/#!/off-canvas

I'm looking for either a solution to this problem, or even a hacked out JS solution to close the window on clicking on "main" content.

您必须将“ zf-close-all”属性添加到body标签。

<body zf-close-all>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM