Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.
$(function() {
// When a thumbnail is clicked
$(".zoom_thumbs a").click(function() {
// Get large image attributes
var largeImg = $(this).attr("href");
var largeTitle = $(this).children("img").attr("title");
var zoomImage = $(".zoom_cnt .zoom img");
//Change the attributes of the large image
$(zoomImage).attr({ src: largeImg, alt: largeTitle, title: largeTitle });
//Once the attributes have been changed - reposition the div containing the image to center it
var wideWidth = $("#wide").width();
var imageWidth = $(".zoom_cnt").width();
var marginLeft = (wideWidth - imageWidth) / 2;
var wideHeight = $("#content").height();
var imageHeight = $(".zoom_cnt").height();
var marginTop = (wideHeight - imageHeight) / 2;
$(".zoom_cnt").css("left", marginLeft);
$(".zoom_cnt").css("top", marginTop);
return false;
});
});
1 to 1 of 1