Skip to content

Commit

Permalink
doc pages offcanvas toggle anchor requires href
Browse files Browse the repository at this point in the history
 Updated offcanvas examples to include href attribute on toggle anchors.

 The offcanvas toggle anchors require an href attribute to work properly
 on iphones as discussed here
 http://foundation.zurb.com/forum/posts/1651-cant-get-off-canvas-to-toggle-on-mobile
  • Loading branch information
here committed May 26, 2014
1 parent 4e1ef6c commit 0a25bea
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions doc/pages/components/offcanvas.html
Expand Up @@ -63,15 +63,15 @@ <h4>HTML</h4>

### Target Off-Canvas Menu

To target an off-canvas menu, add `.left-off-canvas-toggle` or `.right-off-canvas-toggle` to your layout. Clicking on these will activate their corresponding menu.
To target an off-canvas menu, add `.left-off-canvas-toggle` or `.right-off-canvas-toggle` to your layout. Clicking on these will activate their corresponding menu. These anchor elements require the `href` attribute to <a href="http://foundation.zurb.com/forum/posts/1651-cant-get-off-canvas-to-toggle-on-mobile">work on iphones</a>.

<h4>HTML</h4>

```html
<!-- target the leftside menu -->
<a class="left-off-canvas-toggle">Left Menu</a>
<a class="left-off-canvas-toggle" href="#">Left Menu</a>
<!-- target the rightside menu -->
<a class="right-off-canvas-toggle">Right Menu</a>
<a class="right-off-canvas-toggle" href="#">Right Menu</a>

<aside class="left-off-canvas-menu"></aside>
<aside class="right-off-canvas-menu"></aside>
Expand Down Expand Up @@ -132,7 +132,7 @@ <h4>HTML</h4>
To add the nice hamburger icon that everyone knows and loves, add a class of `.menu-icon` to your menu target, and nest a `span` inside of it.

```html
<a class="right-off-canvas-toggle menu-icon" ><span></span></a>
<a class="right-off-canvas-toggle menu-icon" href="#"><span></span></a>
```

Now put it all together...
Expand All @@ -142,10 +142,10 @@ <h4>HTML</h4>
```html
<nav class="tab-bar">
<section class="left-small">
<a class="left-off-canvas-toggle menu-icon" ><span></span></a>
<a class="left-off-canvas-toggle menu-icon" href="#"><span></span></a>
</section>
<section class="right-small">
<a class="right-off-canvas-toggle menu-icon" ><span></span></a>
<a class="right-off-canvas-toggle menu-icon" href="#"><span></span></a>
</section>
</nav>
```
Expand All @@ -171,13 +171,13 @@ <h4>HTML</h4>
```html
<nav class="tab-bar">
<section class="left-small">
<a class="left-off-canvas-toggle menu-icon" ><span></span></a>
<a class="left-off-canvas-toggle menu-icon" href="#"><span></span></a>
</section>
<section class="middle tab-bar-section">
<h1 class="title">Foundation</h1>
</section>
<section class="right-small">
<a class="right-off-canvas-toggle menu-icon" ><span></span></a>
<a class="right-off-canvas-toggle menu-icon" href="#"><span></span></a>
</section>
</nav>
```
Expand Down Expand Up @@ -206,19 +206,19 @@ <h4>HTML</h4>
<!-- that's what she said, lol -->

<nav class="tab-bar">
<section class="left-small"><a class=" menu-icon" ><span></span></a></section>
<section class="left-small"><a class=" menu-icon" href="#"><span></span></a></section>
<section class="right tab-bar-section"><h1>Left Section</h1></section>
</nav>
&nbsp;
<nav class="tab-bar">
<section class="left-small"><a class=" menu-icon" ><span></span></a></section>
<section class="left-small"><a class=" menu-icon" href="#"><span></span></a></section>
<section class="middle tab-bar-section"><h1>Middle Section</h1></section>
<section class="right-small"><a class=" menu-icon" ><span></span></a></section>
<section class="right-small"><a class=" menu-icon" href="#"><span></span></a></section>
</nav>
&nbsp;
<nav class="tab-bar">
<section class="left tab-bar-section"><h1>Right Section</h1></section>
<section class="right-small"><a class=" menu-icon" ><span></span></a></section>
<section class="right-small"><a class=" menu-icon" href="#"><span></span></a></section>
</nav>
&nbsp;

Expand Down

0 comments on commit 0a25bea

Please sign in to comment.