I have used the offcanvas push menu on my website. I want the menu to be opened on certain pages of my site on page load, but the toggle still wok for the viewer to close it / open again if they wish.
How would i set the menu to be open only on certain pages? (pages which all use the same template so I can add custom js to this template only).
I have been looking at the methods and venets in the documentation,but can't work out how to do what i need.
I have tried the 'show' method in just the page template I want the menu to load open on:
<script>
$(function () { $('.navmenu').offcanvas('show'); });
</script>
it works by loading page with the menu open; but laid OVER the 'canvas' (body) - rather than pushing the body off canvas as it does usually. Other than adding this extra jquery to my page i have used the same code as in Jasny's example.
See the fiddle
Many thanks!