Ok so heres my question: I got the following html:
<ul>
<li class="normal">Item1</li>
<li class="normal">Item2</li>
<li class="special">Item3</li>
<li class="normal">Item4</li>
<li class="normal">Item5</li>
</ul>
So now I want to know how to get some tricky hover effect:
- When you hover '.normal': the text colors red.
- When you hover '.normal' and 'special' is before it: '.normal' colors red and '.special' color green.
- When you hover '.normal' and 'special' is after it: '.normal' colors red and '.special' color blue.
I think this is possible with JS/Jquery but I don't know even where to start.
Thanks for any help on this question.
P.S. For everyone who wonder where I will use this: http://dl.dropbox.com/u/4281191/weboutfit/index.html
.special
elements to be highlighted if they're adjacent to thehover
element, or even if they're several elements apart? – jnpcl Dec 27 '11 at 12:53