You're welcome. I was playing around with this a bit more and noticed that sometimes, when the browser hasn't cached the first image yet (or somethimes when the browser is reloading), there's a ghost image of the enlarged image that appears briefly as the page loads.
This can be eliminated. It requires the use of a transparent .gif image and some additional/changed style and code.
If you are using the drop shadow:
Code:
.magnifyarea{ /* CSS to add shadow to magnified image. Optional */
box-shadow: 5px 5px 7px #818181;
-webkit-box-shadow: 5px 5px 7px #818181;
-moz-box-shadow: 5px 5px 7px #818181;
filter: progid:DXImageTransform.Microsoft.dropShadow(color=#818181, offX=5, offY=5, positive=true);
background: white;
}
Change that to:
Code:
.magnifyarea {
border: none!important;
}
.zoomImage { /* CSS to add shadow to magnified image. Optional */
box-shadow: 5px 5px 7px #818181;
-webkit-box-shadow: 5px 5px 7px #818181;
-moz-box-shadow: 5px 5px 7px #818181;
filter: progid:DXImageTransform.Microsoft.dropShadow(color=#818181, offX=5, offY=5, positive=true);
background: white;
}
You will need a small transparent .gif image, like this one (right click and save as, you won't be able to see it):
http://home.comcast.net/~jscheuer1/s...omer/empty.gif
Then add to our already custom init code:
Code:
jQuery(document).ready(function($){
var one = $('#image1').addimagezoom({
//options,
largeimage: 'empty.gif' //<-- No comma after last option!
}).mouseover();
(function(){
if(!one.data('specs')){
setTimeout(arguments.callee, 30);
return;
}
one.mouseout().data('specs').magnifier.$image.attr('src', one.attr('src'))
one.data('specs').magnifier.$outer.removeClass('magnifyarea').addClass('zoomImage');
})();
})
As before use your existing options where the green part is. Make sure each one has a comma at the end. That's it, everything else is the same.
Bookmarks