I am trying to create a website using only one page. I created 5 <section> I use these sections as my pages. I have a navigation on the right side that is fixed. Using the following:
<ul class="navigation"> <li id="link1">ABOUT</li> <li id="link2">WHY HIRE ME</li> <li id="link3">JOURNEY</li> <li id="link4">INSTAGRAM</li> <li id="link5">CONTACT</li> </ul>
I created this list with the following CSS, so it remains fixed on the left side of the browser window.
.navigation{ position:fixed; z-index:1; top:20px; font-size:12px; font-family: Georgia, serif;}
I tried my hand in some jQuery, but I DO NOT DELETE. I would like section 1 to be displayed when opening the site. And for the rest you need to hide. When a user clicks on a link, I would like it to hide all sections except the section with which the link is associated.
I looked and tried .remove / .appendTo functions with .click, but I'm struggling
source share