uisehll with nav finished

This commit is contained in:
adan.ulloa 2020-01-06 18:41:10 -06:00 committed by Adan Ulloa
commit 614ca9d36e
10 changed files with 578 additions and 128 deletions

View file

@ -11,14 +11,14 @@
let listItemSubMenu = undefined;
window.addEventListener('mouseup', ({ target }) => {
if (target !== listItemSubMenu) {
if (expanded) {
console.log('entered first if');
expanded = false;
if (listItemSubMenu) {
if (listItemSubMenu.contains(target) || target === listItemSubMenu) {
expanded = !expanded;
} else {
if (expanded) {
expanded = false;
}
}
} else if (listItemSubMenu.contains(target) || target === listItemSubMenu) {
console.log('entered second if');
expanded = !expanded;
}
});
</script>