Last active
June 24, 2017 07:16
-
-
Save Braunson/6887262 to your computer and use it in GitHub Desktop.
Added close menu option for codrops/SidebarTransitions. Just add closeMenu as the ID to an item in your st-menu container (in your menu)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After some hours I got a solution to close the sidebar with the same button.
I changed
classie.addClass(container, 'st-menu-open');
to
classie.toggleClass(container, 'st-menu-open');
With no effect. Then I changed
container.className = 'st-container';
to
container.id = 'st-container';
Now it works! I can open and close with the same button.
(I made a burger icon)
`buttons.forEach(function(el, i) {
var effect = el.getAttribute('data-effect');