Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is there an option to load as opened? #273

Open
akhoury opened this issue Aug 16, 2018 · 5 comments
Open

is there an option to load as opened? #273

akhoury opened this issue Aug 16, 2018 · 5 comments

Comments

@akhoury
Copy link

akhoury commented Aug 16, 2018

Basically, I want the menu to show up at load time, without having to manually do slideout.open() after page load.

Thanks

@fuhye
Copy link

fuhye commented Nov 1, 2018

according to what I understand

maybe doing some like that

$(document).ready(function () {
slideout.toggle();
});

@akhoury
Copy link
Author

akhoury commented Nov 1, 2018

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
Copy link

Would love this as well.

@dancaron
Copy link

Tried setting 'duration' option to 0 milliseconds, but it still shows an animated opening.

@dancaron
Copy link

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();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants