I'd try:
Code:
ddpowerzoomer.$magnifier.outer.remove();
ddpowerzoomer.init(jQuery);
in place of:
Code:
//the following two lines are an useless attempt to solve the problem
ddpowerzoomer.$magnifier.inner.find('img').attr('src', '');
ddpowerzoomer.$magnifier.inner.html('');
And here in the script, add the highlighted:
Code:
jQuery.fn.addpowerzoom=function(options){
var $=jQuery
return this.each(function(){ //return jQuery obj
if (this.tagName!="IMG")
return true //skip to next matched element
if (typeof options=="undefined")
options={}
if (options.largeimage && options.largeimage.length>0){ //preload large image?
options.preloadimg=new Image()
options.preloadimg.src=options.largeimage
}
var $imgref=$(this).unbind();
options.largeimagesrc=(options.preloadimg)? options.preloadimg.src : $imgref.attr('src')
if (parseInt(this.style.width)>0 && parseInt(this.style.height)>0) //if image has explicit CSS width/height defined
ddpowerzoomer.setupimage($, this, options)
else if (this.complete){ //account for IE not firing image.onload
ddpowerzoomer.setupimage($, this, options)
}
else{
$imgref.bind('load', function(){
ddpowerzoomer.setupimage($, this, options)
})
}
})
}
If you want more help:
Please post a link to a page on your site that contains the problematic code so we can check it out.
Bookmarks