troubleshooting Question

jQuery Change Image on click

Avatar of Robert Granlund
Robert GranlundFlag for United States of America asked on
2 Comments1 Solution476 ViewsLast Modified:
I have a small jQuery function that swaps images on click.  However, after you start clicking on the thumbnails the main thumbnail, the initial thumbnail starts to show up twice.  You can go here and click on the images on the left to see what I mean.

cohr-dev-ee01 DOT azurewebsites DOT net/lasers/laser/diode-laser-systems-and-fiber-lasers/highlight-d-series

$(function() {
$('.image-thumb-cont img').click(function() {
var thmb = this;
var src = this.src;
$('.main-image-cont img').fadeOut(400,function(){
thmb.src = this.src;
$(this).fadeIn(400)[0].src = src;
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros