Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello,
I have a function inside of my .js.liquid file which creates a carousel on a button click. But in order to get my second part of script working, I need to be able to seperate images based on their image.id. Doing it on a main proudct page wasn't hard but generating the media.id output for each image seems a bit hard for me to figure it out.
Basically this piece of code gets me the product images I need, but the "img-data" part I can't figure it out:
$(images).each(function (i,src) {
thumbnailContainer.append('<img src="' + src +'" img-data="' + media.id + '" alt="qv-img" class="lazyload">');
});
Would appreciate some pointers.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025