View Full Version : jQuery Image Magnify v1.1 and jquery 1.4

10-18-2010, 01:00 PM
1) Script Title: :: jQuery Image Magnify v1.1

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/imagemagnify.htm
3) Describe problem: The demo uses jquery 1.3.2.
When I try to use version 1.4.3 of jquery (http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js) the image magnifies only the first time it is clicked. It still works with version 1.4.2.

10-19-2010, 02:54 AM
Interesting, it looks like v1.4.3 animating a hidden image's dimensions by itself no longer reveals the image unless it's first made visible. Inside the .js file of the script, try finding the below line, and add to it the part in red:

$clone.stop().show().css({zIndex:++jQuery.imageMagnify.zIndexcounter, left:imageinfo.attrs.x, top:imageinfo.attrs.y, width:imageinfo.attrs.w, height:imageinfo.attrs.h, opacity:0, visibility:'visible'})
.animate({opacity:1, left:imageinfo.newattrs.x, top:imageinfo.newattrs.y, width:imageinfo.newattrs.w, height:imageinfo.newattrs.h}, setting.duration,
function(){ //callback function after warping is complete
//none added
}) //end animate
}) //end click