Skip to content

Commit

Permalink
Fix bug: Image loading was broken when used with jQuery 3.
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcdougall committed Nov 14, 2016
1 parent 18efa27 commit 85f8c9b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions jquery.lightbox.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* jquery.lightbox.js v1.3
* https://github.com/duncanmcdougall/Responsive-Lightbox
* Copyright 2015 Duncan McDougall and other contributors; @license Creative Commons Attribution 2.5
* Copyright 2016 Duncan McDougall and other contributors; @license Creative Commons Attribution 2.5
*
* Options:
* margin - int - default 50. Minimum margin around the image
Expand Down Expand Up @@ -68,7 +68,7 @@

var img = $('<img src="' + $(plugin.current).attr('href') + '" draggable="false">');

$(img).load(function () {
$(img).on('load', function () {
$('.lightbox__loading').remove();
plugin.lightbox.append(img);
plugin.image = $("img", plugin.lightbox).hide();
Expand Down
2 changes: 1 addition & 1 deletion jquery.lightbox.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 85f8c9b

Please sign in to comment.