is there an option to load as opened?
akhoury opened this issue · 5 comments
akhoury commented
Basically, I want the menu to show up at load time, without having to manually do slideout.open()
after page load.
Thanks
fuhye commented
according to what I understand
maybe doing some like that
$(document).ready(function () {
slideout.toggle();
});
akhoury commented
sorry, I should have been more clear, i wanted it to load as open without flashing to the user that it was closed and it's opening on document.ready
dancaron commented
Would love this as well.
dancaron commented
Tried setting 'duration' option to 0 milliseconds, but it still shows an animated opening.
dancaron commented
Figured it out. The key is setting duration to 10 and not 0.
// side menu
var slideout = new Slideout({
'panel': document.getElementById('panel'),
'menu': document.getElementById('menu'),
'padding': 320,
'tolerance': 70,
'duration': 10,
});
slideout.open();