From e12790bb3b069db28c5f36d83faf620566676f94 Mon Sep 17 00:00:00 2001 From: David Govea Date: Sun, 11 May 2014 14:14:01 -0700 Subject: [PATCH] Add docs for programmatic show / hide / toggle of off-canvas --- doc/pages/components/offcanvas.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/pages/components/offcanvas.html b/doc/pages/components/offcanvas.html index bfe94cc42..40016a264 100644 --- a/doc/pages/components/offcanvas.html +++ b/doc/pages/components/offcanvas.html @@ -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? -- 2.47.2