so i want my navbar items to get bigger when im on the page that theyre linked to, for example if im on the home section i want the home button to be bigger and if im on about section i want the about button to get bigger. i tried the js script but idk why its not working here's the code
ul{
list-style: none;
}
a{
text-decoration: none;
}
#navbar{
position: absolute;
width: 50vw;
left: calc(50vw - 25vw);
}
#navbarlist{
top: 50px;
left: 25vw;
width: 50vw;
position: fixed;
display: flex;
justify-content: space-between;
z-index: 1;
padding: 0;
}
.navbaritem{
display: flex;
justify-content: center;
align-items: center;
color: #000;
opacity: 0.5;
width: 100px;
height: 100px;
border-radius: 50%;
}
.navbaritem:hover{
transform: scale(1.5);
margin-top: 30px;
}
.current{
transform: scale(1.5);
margin-top: 30px;
color: aqua;
}
.home{
background-color: rgba(216,157,255,1);
}
.about{
background-color: rgb(236,136,183);
}
.products{
background-color:rgba(255,115,115,1);
}
.services{
background-color:rgba(255,179,111,1);
}
.contactus{
background-color: rgba(255,253,106,1);
}
#home{
width: 100vw;
}
#homeheader{
font-size: 140px;
position: relative;
top:75px;
transform: rotate(-3.4deg);
}
.sections{
width: 100vw;
}
#aboutheader{
position: relative;
font-size: 70px;
top: 500px;
}
#aboutuspart{
font-size: 140px;
}
<header>
<nav id="navbar">
<ul id="navbarlist">
<li class="navbaritem home"><a class="" href="#home">home</a></li>
<li class="navbaritem about"><a href="#about">about</a></li>
<li class="navbaritem products"><a href="#products">products</a></li>
<li class="navbaritem services"><a href="#services">services</a></li>
<li class="navbaritem contactus"><a href="#contactus">contact us</a></li>
</ul>
</nav>
</header>
i have tried to make that happen with js but its not working and i cant figure out why