[Examples] Product image now changes on clicking product image thumb (#2509)

Co-authored-by: EloquentShashank <52653070+EloquentShashank@users.noreply.github.com>
pull/2516/head
bansalshashank 2020-01-24 17:25:01 +05:30 committed by Raphael Jackstadt
parent 63eb7d2e8d
commit 8a66185901
1 changed files with 7 additions and 0 deletions

7
dist/js/demo.js vendored
View File

@ -416,4 +416,11 @@
return $block
}
$('.product-image-thumb').on('click', function() {
const image_element = $(this).find('img');
$('.product-image').prop('src', $(image_element).attr('src'))
$('.product-image-thumb.active').removeClass('active');
$(this).addClass('active');
});
})(jQuery)