Reputation: 10230
I was just trying to use THIS plugin on a small project of mine. , I have gone through the USAGE section multiple times and also checked the example files once downloaded from git(none of the example files actually work ! ) and so i have the following HTML::
<div class="sb-slidebar sb-left sb-style-push">
<!-- Your left Slidebar content. -->
<p>Just a line of text to demonstrate the push effect.</p>
</div>
<div id="sb-site">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sint, tenetur fuga voluptas ducimus quis nulla velit esse suscipit, quidem tempore. Quisquam quod nisi, magni labore dolorem corporis, cum modi nobis!
</div>
and the following jQuery init code:
$.slidebars();
and ofcourse the sidebar css and js files linked. but somehow the plugin does't work , i am assuming that the hamburger is created internally in the JS of sidebars , not sure how it all work but i am not able to create a sidebar meenu , can somebody point me to what am i doing wrong ?
I just want to get this sidebar menu working.
Upvotes: 0
Views: 160
Reputation: 1859
The following is using version 0.10.3.
Using the control classes described in the usage section I was unable to get the sidebar to open at all.
What did work for me was using the API methods.
$(document).ready(function() {
var mySlidebars = new $.slidebars();
$('.toggle').on('click', function() {
mySlidebars.slidebars.toggle('left');
});
});
Upvotes: 1