Last active
August 29, 2015 13:55
-
-
Save pelmered/9d9652688c4215700794 to your computer and use it in GitHub Desktop.
Replace fullsize image when thumbnail is clicked in WooCommerce/Wordpress
This file contains hidden or 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(function($){ | |
$('.thumbnails>a>img').click(function(e){ | |
e.stopPropagation(); | |
$('.woocommerce-main-image img').attr('src', $(this).attr('src').replace('-87x87','-564x564')); | |
return false; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Replace -87x87 and -564x564 with your specific image sizes