Looking for some assistance here. I have a button that toggles between displaying and hiding information. When the information is displayed, it should have one style, and when it's hidden, it should have another. Currently, I'm able to change the style when the button is clicked using "button:focus", but the style doesn't switch back when the button is clicked again. Is there a way to toggle between the two styles every time the button is clicked? Any help would be appreciated.
Below is my CSS code for the button:
#button1 {
height:50px;
width:170px;
border-style: solid;
font-weight: 700;
text-transform: uppercase;
font-size: 0.875rem;
letter-spacing: 1px;
font-family: "Roboto", serif;
background-image: none;
box-shadow: 2px 2px 8px 0 rgba(128,128,128,1);
margin: 0 auto 0;
border-color: white;
color:white;
background-color:rgb(4, 30, 78);
border-radius: 30px;
}
#button1:hover {
background-color: white;
color:rgb(4, 30, 78);
border-color:rgb(4, 30, 78);
cursor:pointer;
}
#button1:focus{
background-color: white;
color:rgb(4, 30, 78);
border-color:rgb(4, 30, 78);
cursor:pointer;
}