Skip to content

Commit

Permalink
Fixed wheelzoom init
Browse files Browse the repository at this point in the history
  • Loading branch information
Luperi committed Apr 4, 2017
1 parent 6c9d197 commit 46e50b1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions wheelzoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,13 @@ window.wheelzoom = (function(){
settings[key] = typeof options[key] !== 'undefined' ? options[key] : defaults[key];
});

if (img.complete) {
load();
}
var t = setInterval(function(){
if (img.complete) {
load();
}

img.addEventListener('load', load);
clearInterval(t);
}, 100);
};

// Do nothing in IE8
Expand Down

0 comments on commit 46e50b1

Please sign in to comment.