Skip to content

Commit

Permalink
Merge pull request dimsemenov#177 from flymke/master
Browse files Browse the repository at this point in the history
fix for chrome ("Uncaught Error: NotFoundError: DOM Exception 8")
  • Loading branch information
dimsemenov committed Jul 29, 2013
2 parents cfc7f89 + 51640c1 commit d40c1b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ $.magnificPopup.registerModule('image', {

var el = template.find('.mfp-img');
if(el.length) {
var img = new Image();
var img = document.createElement('img');
img.className = 'mfp-img';
item.img = $(img).on('load.mfploader', onLoadComplete).on('error.mfploader', onLoadError);
img.src = item.src;
Expand Down

0 comments on commit d40c1b9

Please sign in to comment.