mirror of https://github.com/ColorlibHQ/AdminLTE
[Examples] Product image now changes on clicking product image thumb (#2509)
Co-authored-by: EloquentShashank <52653070+EloquentShashank@users.noreply.github.com>pull/2516/head
parent
63eb7d2e8d
commit
8a66185901
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue