For a business website I'm trying to achieve the following: - A div with testimonials from clients. - A list with logos from those clients.
When the user hovers over a logo, the correct testimonial should be displayed in the div.
I've got the following markup:
<div id="testimonial-container"><div class="testimonial">Here comes a testimonial</div>
<div class="testimonial">Here comes another testimonial</div>
<div class="testimonial">And another one</div>
<ul class="testimonial-logos">
<li><a><img src="logo-1.jpg" /></a></li>
<li><a><img src="logo-2.jpg" /></a></li>
<li><a><img src="logo-3.jpg" /></a></li>
</ul>
</div>
The hover effect will be done with CSS (opacity:0, and 1), so it isn't really a slider.
To add a class to the active testimonial, I use this code:
jQuery('#testimonial-container .testimonial-logos a').hover(function(){
jQuery('#testimonial-container .testimonial, #testimonial-container .testimonial-logos a').addClass('active');
});
Any ideas how to switch the testimonials in the div? Thanks in advance!