Skip to content
This repository has been archived by the owner on Aug 30, 2020. It is now read-only.

Commit

Permalink
bug fixed which made a7.onMenuToggle not work
Browse files Browse the repository at this point in the history
  • Loading branch information
anton7r committed Jul 3, 2019
1 parent 98c3c53 commit 28f1221
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion a7.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,21 +158,29 @@ SOFTWARE.
open = ["a7-menu-",menuName,"-open"].join(""),
closed = ["a7-menu-",menuName,"-closed"].join(""),
menuState;

classList.toggle(open);
classList.toggle(closed);

var menuToggleFunc = onMenuToggleList[menuName];
if (menuToggleFunc === undefined){
return;
}

if (classList.contains(open) === true){
menuState = "open";
} else {
menuState = "closed";
}

menuToggleFunc(menuState);

return;
};
a7.closeMenu = function(menuName){
var menuToggleFunc = onMenuToggleList[menuName];
if(menuToggleFunc !== undefined){
menuToggleFunc("menu-closed");
menuToggleFunc("closed");
}
var elem = menus[menuName],
classList = elem.classList,
Expand Down
2 changes: 1 addition & 1 deletion a7.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 28f1221

Please sign in to comment.