Miva Merchant Modules and Development
Want to start an online store? We work with you from start to finish, from commerce platform to design to SEO.
Experience counts, and we have a lot.

IMAGEMACHINE: Add classes to image machine images

Scot Ranney • December 19, 2023


<script>
ImageMachine.prototype.ImageMachine_Generate_Thumbnail = function( thumbnail_image, main_image, closeup_image, type_code )
{
	var thumbnail, span, img;
	thumbnail	= document.createElement( 'li' );
	thumbnail.className = "list-inline-item";
	span		= document.createElement( 'span' ); // to vertically center the thumbnail images
	thumbnail.appendChild( span );
	if ( typeof( thumbnail_image ) == 'string' && thumbnail_image.length > 0 )
	{
		img		= document.createElement( 'img' );
		img.src	= thumbnail_image;
		img.className = "img-thumbnail";
		thumbnail.appendChild( img );
	}
	return thumbnail;
}
</script>

https://www.scotsscripts.com/mvblog/imagemachine-add-classes-to-image-machine-images.html

mvkb_imagemachine