I need help making getting multiple buttons to change color when clicked and go back to the previous color when clicked a second time.
Here is my code:
<!DOCTYPE html>
<html>
<head>
<style>
.choices{
background-color:#F0F3F4;
padding:15px 32px;
display:inline-block;
font-size:16px;
font-family:century gothic;
font-weight:bold;
margin:6px 4px;
cursor:pointer;
border-radius:12px;
border:2px solid #5D6D7E;
}
.choices:hover{
background:#D0D3D4;
}
</style>
<script>
</script>
</head>
<body>
<div>
<button class="choices" type="button" id="button" >Grapes</button>
<button class="choices" type="button" id="button">Bananas</button>
<button class="choices" type="button" id="button">Strawberries</button>
<button class="choices" type="button" id="button">Apples</button>
</body>
</html>
I'm not super experienced with javascript so I think I just need help figuring out how I can use javascript to solve the problem.