[ad_1]
Hi,
Thank you for reaching out to us.
Yes, you may add this code to the JS file in your theme or in custom script:
jQuery(document).ready(function ($) {
jQuery('.single-product form.variations_form.vi_wpvs_variation_form').on('show_variation', function (event, v) {
if (jQuery(window).width() <= 600 && v && v.hasOwnProperty('image_id') && jQuery(this).attr('current-image') != v.image_id) {
window.scrollTo({top: parseInt(jQuery('.woocommerce-product-gallery').offset().top), behavior: 'smooth'});
}
});
});Best regards.
