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
@CapitalH @arshidkv12
This worked for me in WordPress 4.6