Gallery JS Code to trigger clic on thumbnail, not working at all yet
Hello! I want to showcase a different image by default on my single product page by triggering a clic on the second thumbnail, so it is the one selected by default.
This code should work, but it seems that something else is interfering:
jQuery(function($){
$(document).ready(function(){
$(window).on('load', function() {
$('.flex-control-thumbs li').eq(1).find('img').click();
});
});
});
So, please, do you have any ideas on how to fix it or how to do it?
I know, changing pictures on gallery sounds like an easier solution, but it would change the main product image on shop page too, and I don't want that.
This is the result I am looking for when loading the single product page on every product:
This is my link: https://rremore.com/index.php/product/alessia-havanna/
Greetings.
Comments
Hi,
1) Sorry, but we did not test this script with the theme. Our policy states that we do not support third-party plugins or custom code, so we cannot help you with that.
For this, you should contact your web developer.
2) We do not have such functionality, and you would have to modify the files or use some third-party plugin.
However, I found the following article:
https://www.webdesignvista.com/how-to-show-different-product-image-in-woocommerce-shop-category-and-single-product-pages/
Hope it will be useful for you.
Best regards