Closed mcfarljw closed 9 years ago
You're initializing the offcanvas twice. It opens the first time because option toggle
(Toggles the off canvas element on invocation) defaults to true
. The second initialization has no effect.
$('.navmenu').offcanvas({canvas: 'body', toggle: false}) //initialize
$('.navmenu').offcanvas('show') //opens properly with push
$('.navmenu').offcanvas('hide') //closes properly with push
$('.navmenu').offcanvas('show') //opens properly with push
I've tried it with the following example using the console:
http://jasny.github.io/bootstrap/examples/navmenu-push/
If you open the console and run the following commands:
Is there something I'm doing wrong programmatically when closing offcanvas that is preventing it from opening a second time. This isn't a problem when using data tags directly in the html on programmatically using jquery.