gifplayer icon indicating copy to clipboard operation
gifplayer copied to clipboard

Preload bug jquery 3.0

Open walterfaas opened this issue 9 years ago • 1 comments

Hi,

Found this little bug using jquery 3.0. According to the answer on Stackoverflow the preload "load" function needs to be different:

http://stackoverflow.com/questions/37738732/jquery-3-0-url-indexof-error

So when changing:

// Wait until gif loads this.gifElement.load( function(){ gp.animationLoaded = true; gp.resetEvents(); gp.previewElement.hide(); gp.wrapper.append(gp.gifElement); gp.spinnerElement.hide(); gp.getOption('onLoadComplete').call(gp.previewElement); });

to

// Wait until gif loads this.gifElement.on({ load: function(){ gp.animationLoaded = true; gp.resetEvents(); gp.previewElement.hide(); gp.wrapper.append(gp.gifElement); gp.spinnerElement.hide(); gp.getOption('onLoadComplete').call(gp.previewElement); } });

Things work again.

Thanks for this plugin!

Greetz, walter

walterfaas avatar Jul 29 '16 08:07 walterfaas

Thanks for the patch! Would be good to see it merged - perhaps you should change the above to a pull request?

IdanAdar avatar Oct 30 '16 13:10 IdanAdar