Created
September 22, 2013 14:45
-
-
Save artboard-studio/6660612 to your computer and use it in GitHub Desktop.
update woocommerce main product image on thumbnail click
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@marcelo2605
where should I enter your code? should I make one new file of js?