jackmoore / zoom

jQuery plugin for zooming images on mouseover.
http://www.jacklmoore.com/zoom/
MIT License
1.54k stars 460 forks source link

a bug on zoom out #140

Open sezarsaman opened 5 years ago

sezarsaman commented 5 years ago

Hi, I've launched a website about a year ago and I've used "Zoom" on the products page and it was working nicely. Since recently without any changes, there appeared an odd bug. On mouse out, the photo will remain where the mouse left the area and doesn't go to the center! I updated to the 1.7.21 version but the bug still remains. This is my script to call "zoom" on a gallery: if($('.zoom').length){ $('.zoom').zoom({url: $('.zoom img').attr('srcX')}); } if($('.gallery').length){ $('.gallery .thumbnail').on('click',function(e){ e.preventDefault(); var _srcX = $(this).attr('href'); $('.zoom img').attr('srcX',_srcX); $('.zoom img').attr('src',_srcX); }) } Could you help me with this issue? Thanks