I'm currently working on a list containing 5 items, with the first one active by default (thanks to jQuery adding a 'active' class). Each item has its own background image. When I click on any of the list items, another div gets updated with relevant content.
However, I'm facing a challenge:
I want to achieve the following behavior - when an item is clicked, its background image should change to color (using the '-cl.png' suffix). If I hover over another item, its background image should also change to color, while keeping the previously clicked item in color as well. Any item that is not hovered over should display a black and white version of the background image (with the '-bw.png' suffix), except for the active item which should remain in color.
I hope this explanation makes sense. Any suggestions on how I can implement this? Thanks, Brett
Below 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>