The only thing that works is the else statement the 2 if statements do not work( I also tried else if statements and those do not work either). I need the description to change when the user clicks on the radio button according to the image displayed. The description should match the image. I am new to javascript.
<div id = "image-text">
<p>The statue of liberty was built in France and disassembled and transported by a ship
to the United States. It was completed in October of 1886 and is a symbol of freedom.
</p>
</div>
<!-- Radio buttons-->
<div id = "radio-buttons">
<form>
<input type="radio" id="statue-button" name="landmark" checked value="statue" onClick="changeImage('statue');changeText('image-text')";">Statue of Liberty<br>
<input type="radio" id = "bridge-button" name="landmark" value="bridge" onclick="changeImage('bridge');changeText('image-text')" >Golden Gate Bridge<br>
<input type="radio" id = "rushmore-button" name="landmark" value="rushmore" onclick="changeImage('rushmore');changeText('image-text')">Mount Rushmore<br>
</form>
</div>
<p></p>
<!-- Function that changes the description of the image-->
<script>
function changeText(value) {
let imageText = document.getElementById('image-text');
let changes = document.getElementById('radio-buttons');
if (value = 'statue') {
imageText.innerHTML = "The statue of liberty was built in France and disassembled and transported by a ship to the United States. It was completed in October of 1886 and is a symbol of freedom."
}
if (value === 'bridge') {
imageText.innerHTML = "The Golden Gate Bridge is a suspension bridge spanning the Golden Gate, the one-mile-wide strait connecting San Francisco Bay and the Pacific Ocean";
}
else {
imageText.innerHTML= "Mount Rushmore National Memorial is a massive sculpture carved into Mount Rushmore in the Black Hills region of South Dakota. It was completed in 1941.";
}
}
</script>