Have managed to get the Jasny Bootstrap off canvas
component to work. It has a few different responsive settings, though defaults into the 'push' option: (http://jasny.github.io/bootstrap/examples/navmenu-push/).
I'd like to enable the 'reveal' option instead and have been using the following snippet of code (directly from the Jasny BS site) as an example:
<nav id="myNavmenu" class="navmenu navmenu-default navmenu-fixed-left" role="navigation">
<div id="targetDiv">
Content
</div>
</nav>
<div class="navbar navbar-default navbar-fixed-top">
<button type="button" class="navbar-toggle" data-toggle="offcanvas" data-target="#myNavmenu" data-canvas="#targetDiv">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
As the instructions state on the 'reveal' page (http://jasny.github.io/bootstrap/examples/navmenu-reveal/), I have:
1) Wrapped the content in a div (targetDiv
above), and then set the canvas option (which I believe is data-canvas
) to equal that div; i.e. data-canvas="#targetDiv"
.
2) Removed the offcanvas
class from the myNavmenu
nav and set its z-indez to 0 via less.
What I get does not behave like the example: http://jasny.github.io/bootstrap/examples/navmenu-reveal. What am I doing incorrectly?