I need to implement functionality where 4 different links change the class of a specific div when clicked. For example, clicking on link 1 will change the class to s1, link 2 to s2, and so on.
Below is some code that I have been working on, however, I am still learning jQuery and not sure about the implementation:
<div class="vehicleJourney">
<div id="progress">
<div id="complete" class="s2"><!--need class to change -->
<div id="marker"></div>
</div>
</div>
<div class="buttons">
<ul>
<li class="s1"><a class="showSingle" data-target="1">s1</a></li>
<li class="s2"><a class="showSingle selected" data-target="2">s2</a></li>
<li class="s3"><a class="showSingle" data-target="3">s3</a></li>
<li class="s4"><a class="showSingle" data-target="4">s4</a></li>
</ul>
</div>
</div>
Any help or suggestions would be greatly appreciated. Thank you!