HENRYKC24/my-portfolio

Suggested fixes for your project.

Closed this issue · 0 comments

Hello Henry,
Your project looks lovely as always, however I encountered some problems trying to run it on my local environment and I think I have identified the source of the problem.

Firstly, I noticed that you didn't specify what exactly you were referencing when using

document.querySelector('menu-icon');

in the following line.

const menuButton = document.querySelector('menu-icon');

The simple fix here is specifying if you're calling a class or an id.

Secondly, I noticed in line 9 that you were incorrectly referencing a class but at the same time referencing a non-existent class.

body.classList.remove('stop');

I identified the correct class as .stop-scrolling .

Below are some fixes and recommended documentation for you to read up on regarding js Document.query.Selector()

Fixes

For L3

const menuButton = document.querySelector('.menu-icon');

For L9

body.classList.remove('.stop-scrolling');

Recommended documentation to read.

Documentation