I've had this script on one of my sites for a while now but at some point something's has broken. Not sure what or when. Basically I had this to replace the main product image (on a single product page) with the thumbnail, when clicked.
<script type="text/javascript"> jQuery('.thumbnails .zoom').click(function(){ var photo_fullsize = jQuery(this).find('img').attr('src').replace('-180x180','-600x600'); jQuery('.woocommerce-main-image img').attr('src', photo_fullsize); retu false; });
</script>
I've checked the images sizes are correct i.e. 180x180 for a thumbnail and 600x600 for the main image and they are so I'm a little lost!
Any ideas or help to get it working again would be greatly appreciated.