As a beginner with no Js knowledge, I am trying to achieve a specific function. I want to be able to change the color of text when it is clicked, but also have the previously clicked text return to its original color.
<div class="mt-5 first-member" onclick="document.getElementById('myImage').src='./assets/images/person-team.png'">
<span>
<small>
<sup>01</sup>
</small>
</span>
<h1> Alexandr Bruegel</h1>
</div>
<div class="mt-3 other-member" onclick="document.getElementById('myImage').src='./assets/images/bg-img.png'">
<span>
<small>
<sup>02</sup>
</small>
</span>
<h1>Ann Fowler</h1>
</div>