Skip to content

Instantly share code, notes, and snippets.

@artboard-studio
Created September 22, 2013 14:45
Show Gist options
  • Save artboard-studio/6660612 to your computer and use it in GitHub Desktop.
Save artboard-studio/6660612 to your computer and use it in GitHub Desktop.
update woocommerce main product image on thumbnail click
jQuery(document).ready(function($) {
"use strict";
$(document).on('click','.thumbnails .zoom', function(){
var photo_fullsize = $(this).find('img').attr('src').replace('-150x180','');
$('.woocommerce-main-image img').attr('src', photo_fullsize);
return false;
});
});
@vshah9
Copy link

vshah9 commented Sep 23, 2016

@marcelo2605
where should I enter your code? should I make one new file of js?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment