on change, selected option

PHOTO EMBED

Thu Oct 21 2021 06:17:36 GMT+0000 (UTC)

Saved by @JureVidmar #jquery #javascript

  $('.upsell-variants').on('change', function() {
    var optionSelected = $("option:selected", this);
    var main_img = $(optionSelected).data("src");
    $('.product__upsell-image img').attr('src', main_img);
  });
content_copyCOPY

Pupnaps cart upsell, to change featured image

https://workflowy.com/