Scott
@ldgAll comments
- @bant095Submitted over 1 year ago@ldgPosted over 1 year ago
Hi Ayodeji,
Really nice work on this challenge. One comment, I noticed that the hamburger menu didn't seem to work on smaller screens. I think the issue is that there is an extra comma in your callback arrow function, just after the parenthesis. I also noticed the eventListener was missing a semi-colon to close out the statement.
hamburgerIcon.addEventListener("click", (), => { navBar.classList.toggle("active"); })
I think this will fix it:
hamburgerIcon.addEventListener("click", () => { navBar.classList.toggle("active"); });
0 - @alexander-hergertSubmitted over 1 year ago@ldgPosted over 1 year ago
Hi Alexander,
I wanted to comment on your javascript, I found it well organized and easy to follow. Your code in general is nicely organized, and very readable. I still struggle with Javascript so I appreciate the clarity of your code.
I also have two minor suggestions:
1/ I notice on desktop view, your submenu container will expand from a hover event on menu links that are wider. This creates an unintended expansion of the dropdown menu. I think you can resolve that by setting wider, fixed width on the
.sublinks-container
. That will stop the wobble effect when passing the cursor over links.2/ It might be nice to set a css transition on your buttons, just something slow down the hover effect, it will make that interaction feel a bit smoother, less jarring. I think that will give your solution a more polished look.
Marked as helpful0