jackmoore / zoom

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

Bug fix if destroy is called before image onload has finished. #69

Open crispwake opened 9 years ago

crispwake commented 9 years ago

If destroy was called before the image onload was triggered, the onload function was still executed and appended the image to the page despite being destroyed.

This could cause many instances of the 'zoom' image to be appended undesirably, for example when initiating zoom on mouseover of thumbnails and destroying on mouseout. If a user drags mouse across thumbnails, all zoom images would be appended to the page despite destroy being called on mouseout prior to the image loading.