Disable auto scroll of variant image in Brooklyn

New Member
15 0 0

I would like it to not switch to the image that correlates with the variant selector, I find this creates a weird jumpy affect on my page as it trys to show me the image that matches that variant, I would rather it just be static when the options are changed. Any help would be appreciated. Thank you.

0 Likes
Astronaut
1890 1 395

Open Assets/timber.js.  Look for the following section of code and comment it out.

    /* This section of code causes the page to jump to the variant image when a variant option is selected. It is now commented out.

    // Update variant image, if one is set
    if (variant.featured_image) {
      var newImg = variant.featured_image,
          el = $productImage[0];
      Shopify.Image.switchImage(newImg, el, theme.showVariantImage);
    }

    */

 

0 Likes
New Member
15 0 0

Perfect, worked, thank you!

0 Likes
New Member
1 0 0

Any updated method? I can't find the given code in the directory anymore. I think they redesigned the codes

0 Likes