From: David Govea Date: Sun, 11 May 2014 21:14:01 +0000 (-0700) Subject: Add docs for programmatic show / hide / toggle of off-canvas X-Git-Tag: v5.2.3~26^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=refs%2Fpull%2F5136%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Add docs for programmatic show / hide / toggle of off-canvas --- 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?