Replace product image with swatch on click

As always - the code displayed is unofficial, with no support provided. Changes to the CMS may make the code obsolete, it is up to you to keep code current.

Use with jQuery onReady statement.

$("#styleSwatches .clickCheckbox img").unwrap("a").click(function(e){
src = $(this).attr("src");
src = src.replace('-160x160','');
var image = $("#ContentCMS .zoomedphoto img");

image.fadeOut('fast', function () {
image.attr('src', src);
image.fadeIn('fast');
});
});

Index Previous Next