Currently, I am in the process of working on a project for my Web Programming course at University. The homepage is almost complete, but during testing, I noticed that each time the scroll event is triggered, there is a significant slowdown.
This particular event is responsible for altering the appearance of my navigation bar. When the page is at the top, the navigation bar sits at the top right with elements listed vertically. However, when anywhere else on the page, it moves below the title bar and the elements are listed horizontally.
To better diagnose the issue, instead of pasting the entire code here, I have provided a link to my GitHub repository where you can view the project: