Skip to content

Commit

Permalink
Merge pull request #34 from mattrabe/master
Browse files Browse the repository at this point in the history
Re #20: Preload bug jquery 3.0
  • Loading branch information
rubentd committed Feb 19, 2018
2 parents 5462e49 + 5d01f70 commit a012840
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dist/jquery.gifplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,14 @@
var wait = this.getOption('wait');
if(wait){
//Wait until gif loads
this.gifElement.load( function(){
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);
});
}});
}else{
//Try to show gif instantly
gp.animationLoaded = true;
Expand Down
4 changes: 2 additions & 2 deletions src/gifplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,14 @@
var wait = this.getOption('wait');
if(wait){
//Wait until gif loads
this.gifElement.load( function(){
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);
});
}});
}else{
//Try to show gif instantly
gp.animationLoaded = true;
Expand Down

0 comments on commit a012840

Please sign in to comment.