SiteGenesis Mini Images Code Example

You can have code that finds matching detail images.

This snippet iterates through all mini images and finds matching detail images, for example, when a customer clicks a mini image.

var p : Product;
var m = p.getImages( 'swatch' );
var d = p.getImages( 'large' );
for( var i = 0; i < m.size(); i++ )
   // explicit bounce checks have to be implemented in JS manually
   var swatchImage = m[i];
   var largeImage = d[i];
X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.