OnoffCanvas

A jQuery off-canvas Plugin

Star Fork Download

Page Canvas

position: fixed

Code

<div class="onoffcanvas is-fixed is-top" id="cft" aria-expanded=false>
  <h1>Top Canvas</h1>
  <a href="#cft" class="onoffcanvas-toggler" data-toggle=onoffcanvas aria-expanded="false" style="width:100px; height:100px;"></a>
</div>

<div class="onoffcanvas is-fixed is-right" id="cfr">
  <h1>Right Canvas</h1>
  <a href="#cfr" class="onoffcanvas-toggler" data-toggle=onoffcanvas aria-expanded="false" style="width:100px; height:100px;"></a>
</div>

<div class="onoffcanvas is-fixed is-bottom" id="cfb">
  <h1>Bottom Canvas</h1>
  <a href="#cfb" class="onoffcanvas-toggler" data-toggle=onoffcanvas aria-expanded="false" style="width:100px; height:100px;"></a>
</div>

<div class="onoffcanvas is-fixed is-left" id="cfl">
  <h1>Left Canvas</h1>
  <a href="#cfl" class="onoffcanvas-toggler" data-toggle=onoffcanvas aria-expanded="false" style="width:100px; height:100px;"></a>
</div>

<div class="onoffcanvas is-fixed" id="cff">
  <a href="#cff" class="onoffcanvas-toggler" data-toggle="onoffcanvas" aria-expanded="false" style="width:200px; height:200px;top: 50%;left: 50%;transform: translate(-50%, -50%);"></a>
</div>

Card Canvas

position: absolute

Top Canvas

A generic square placeholder image with rounded corners in a figure.
A caption for the above image.

Right Canvas

A generic square placeholder image with rounded corners in a figure.
A caption for the above image.

Bottom Canvas

A generic square placeholder image with rounded corners in a figure.
A caption for the above image.

Left Canvas

A generic square placeholder image with rounded corners in a figure.
A caption for the above image.

Center Canvas

A generic square placeholder image with rounded corners in a figure.
A caption for the above image.

Full Canvas

A generic square placeholder image with rounded corners in a figure.
A caption for the above image.

Hoverable Canvas

position: absolute

Hoverable Canvas

A generic square placeholder image with rounded corners in a figure.
A caption for the above image.
lorem ipsum ...

onoffcanvas-toggler

Alternative 1. Link with href
<a href="#id" class="onoffcanvas-toggler" aria-expanded="false"  data-toggle="onoffcanvas"></a>

Alternative 2. Button with data-target
<button data-target="#id" class="onoffcanvas-toggler" aria-expanded="false"  data-toggle="onoffcanvas"></button>

onoffcanvas-toggler animation

Alternative 1 : add is-open class to parent

<div id="onoffcanvas1" aria-expanded="false"></div>
<div class="is-open">
  <a href="#onoffcanvas1" data-toggle="onoffcanvas" class="onoffcanvas-toggler" aria-expanded="false"></a>
</div>

Alternative 2 : add is-animated class to onoffcanvas-toggle

<div id="onoffcanvas2" aria-expanded="false"></div>
<a href="#onoffcanvas2" class="onoffcanvas-toggler is-animated" aria-expanded="false"  data-toggle="onoffcanvas"></a>





Right Canvas

Bottom Canvas

Left Canvas