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

Sign In or Register to comment.