robinpoort / vanilla-js-responsive-menu

A vanilla JS responsive menu plugin
MIT License
33 stars 5 forks source link

Toggle menu #9

Closed hans2103 closed 8 years ago

hans2103 commented 8 years ago

I'm using the following snippet to toggle the menu.

<script type="text/javascript">
    responsivemenu.init({
        wrapper: document.querySelector('.navigation_container'),
        togglecontent: '<span class="toggle-text">menu</span><span class="hamburger"><span class="bar1"></span><span class="bar2"></span><span class="bar3"></span></span>',
        width: 664
    });
</script>

I'm expecting the menu to toggle on a screen width of 664px. It seems that the menu still toggles on the default 600px instead.

I must be doing wrong... can you reproduce the issue?

robinpoort commented 8 years ago

@hans2103 Changed the width of CSS as well?

https://github.com/robinpoort/vanilla-js-responsive-menu#width

hans2103 commented 8 years ago

By adding $vjsm-menu-width: 664px; to my _settings.scss I notice the issue is solved. thank you