Created
June 21, 2016 16:20
-
-
Save pmbaldha/d26ea7776f227e8ff278b130a29088ee to your computer and use it in GitHub Desktop.
update woocommerce main product image on thumbnail click( function( $ ) { $(document).on('click','.thumbnails .zoom', function(){ var photo_fullsize = $(this).attr("href"); $('.woocommerce-main-image').attr('href',$(this).attr("href")); $('.woocommerce-main-image img').removeAttr("srcset") $('.woocommerce-main-image img').removeAttr("src").attr(…
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
( function( $ ) { | |
$(document).on('click','.thumbnails .zoom', function(){ | |
var photo_fullsize = $(this).attr("href"); | |
$('.woocommerce-main-image').attr('href',$(this).attr("href")); | |
$('.woocommerce-main-image img').removeAttr("srcset") | |
$('.woocommerce-main-image img').removeAttr("src").attr('src', photo_fullsize); | |
return false; | |
}); | |
} )( jQuery ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment