I have a list in which there are 5 elements, the first (at boot) is active (with the "active" class added by jQuery). All have background images associated with them. If I click on any of li, add another div with the appropriate content (this works).
However, I struggle with the following:
If you click on li, refresh its background image as a color (suffix "-cl.png"). When I am on top of another, update its background image so that it is color, and keep the color pressed (with the βactiveβ class). If li does not freeze, set the background image as black and white (suffix "-bw.png"), but keep the active one color.
I hope I have clearly explained. Any ideas on how I can achieve this? Thanks Brett
Here is my HTML:
<ul class="graduate_tab">
<li class="graduate1"><a href="#grad1"><span class="gradimg1">grad1</span></a></li>
<li class="graduate2"><a href="#grad2"><span class="gradimg2">grad2</span></a></li>
<li class="graduate3"><a href="#grad3"><span class="gradimg3">grad3</span></a></li>
<li class="graduate4"><a href="#grad4"><span class="gradimg4">grad4</span></a></li>
<li class="graduate5"><a href="#grad5"><span class="gradimg5">grad5</span></a></li></ul>
source
share