Add the highlighted code as shown to the jquery.magnifier.js file:
Code:
magnify:function($, $target, options){
var setting={} //create blank object to store combined settings
var setting=jQuery.extend(setting, this.dsettings, options)
var effectpos=this.imgshells.length
var attrs={w:$target.outerWidth(), h:$target.outerHeight()}
var newattrs={w:Math.round(attrs.w*setting.magnifyby), h:Math.round(attrs.h*setting.magnifyby)}
$target.css('cursor', jQuery.imageMagnifier.cursorcss)
var $clone=$target.clone().css({position:'absolute', left:0, top:0, visibility:'hidden', border:'1px solid gray', cursor:'pointer'}).appendTo(document.body)
$target.add($clone).data('pos', effectpos) //save position of image
this.imgshells.push({$target:$target, $clone:$clone, attrs:attrs, newattrs:newattrs}) //remember info about this warp image instance
$target.bind('click.magnify', function(e){ //action when original image is clicked on
$('.magnify').each(function(){
var s = this.style;
if(s.visibility === 'visible' && s.position === 'absolute' && s.cursor === 'pointer')
$(this).click();
});
var $this=$(this).css({opacity:setting.imgopacity})
var imageinfo=jQuery.imageMagnifier.imgshells[$this.data('pos')]
jQuery.imageMagnifier.refreshoffsets($(window), $this, imageinfo) //refresh offset positions of original and warped images
var $clone=imageinfo.$clone
$clone.stop().css({zInd . . .
Bookmarks