[Examples] Product image now changes on clicking product image thumb (#2509)
Co-authored-by: EloquentShashank <52653070+EloquentShashank@users.noreply.github.com>
This commit is contained in:
committed by
Raphael Jackstadt
parent
63eb7d2e8d
commit
8a66185901
7
dist/js/demo.js
vendored
7
dist/js/demo.js
vendored
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user