Liljeqvist
Coder
I am currently working as an intern for a company that owns a restaurant/hotel, and they have given me access to their website which they want me to improve. So far I have been able to get a pretty good understanding of the code that the former developer left behind (even though its quite a messy one). But I have been struggling to get the navbar working correctly.
This is the test-site I made for the edited version of the page: http://handig.dk/test/index.html (my apologies for it not being in english)
If you try to click on "menukort", you will notice that a dropdown menu appears. The first problem here is that the dropdown does not appear when I hover over the list item. Secondly, try to go to another section of the page, and then click on "menukort". When you do this, the page jumps back to the first section. I do not want it to do this. I want it to STAY at the section I am currently in. Again, this could be avoided if I could make the dropdown appear on hover.
The last problem is in mobile view. The menu remains open after it has taken me to the section of the page I want to go to. I need to manually close it if I want it to go away. I think this is purely a JavaScript thing. I would like it to close itself after reaching the section I want to go to.
I made a codepen for the navbar, so that it is a bit easier to have an overview of it. https://codepen.io/marc-liljeqvist/pen/vYGvQrp
This is the test-site I made for the edited version of the page: http://handig.dk/test/index.html (my apologies for it not being in english)
If you try to click on "menukort", you will notice that a dropdown menu appears. The first problem here is that the dropdown does not appear when I hover over the list item. Secondly, try to go to another section of the page, and then click on "menukort". When you do this, the page jumps back to the first section. I do not want it to do this. I want it to STAY at the section I am currently in. Again, this could be avoided if I could make the dropdown appear on hover.
The last problem is in mobile view. The menu remains open after it has taken me to the section of the page I want to go to. I need to manually close it if I want it to go away. I think this is purely a JavaScript thing. I would like it to close itself after reaching the section I want to go to.
I made a codepen for the navbar, so that it is a bit easier to have an overview of it. https://codepen.io/marc-liljeqvist/pen/vYGvQrp
Last edited: