]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Add docs for programmatic show / hide / toggle of off-canvas 5136/head
authorDavid Govea <govea.d@gmail.com>
Sun, 11 May 2014 21:14:01 +0000 (14:14 -0700)
committerDavid Govea <govea.d@gmail.com>
Sun, 11 May 2014 21:14:01 +0000 (14:14 -0700)
doc/pages/components/offcanvas.html

index bfe94cc42f52ba3ffce56869a81a680873fe0ad3..40016a2645d51c6d99cfc3eda405a6eed993eafa 100644 (file)
@@ -329,6 +329,18 @@ $(document)
 })
 
 ```
+
+### Programmatic open / close / toggle
+
+The `.off-canvas-wrap` container can be targeted for javascript methods. At this time, the presentational open class needs to be included: either `move-right`, `move-left`, or `offcanvas-overlap`.
+
+```js
+$('.off-canvas-wrap').foundation('offcanvas', 'open', 'move-right');
+$('.off-canvas-wrap').foundation('offcanvas', 'close', 'move-right');
+$('.off-canvas-wrap').foundation('offcanvas', 'toggle', 'move-right');
+
+```
+
 ***
 
 ### Sass Errors?