Skip to content

Commit

Permalink
Bugfix for #88,#87 and remove bind/unbind #84
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jan 29, 2018
1 parent 602b383 commit cb8dabd
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ $sl-iframe-border-large: 0 none;


### Changelog
**1.12.1 - Bugfix for #88,#87 and remove bind/unbind #84**
**1.12.0 - New option captionClass #81, bugfix for #82**
**1.11.1 - Merged pull request #76. Thanks to walterebert, added support for images with parameters and file extension check #59**
**1.11.0 - New option for src of image. e.g data attribute #70**
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simplelightbox",
"version": "1.12.0",
"version": "1.12.1",
"homepage": "http://andreknieriem.de/simple-lightbox",
"authors": [
"André Rinas <[email protected]> (http://andrerinas.de)"
Expand Down
8 changes: 5 additions & 3 deletions dist/simple-lightbox.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
By André Rinas, www.andrerinas.de
Available for use under the MIT License
1.12.0
1.12.1
*/
;( function( $, window, document, undefined )
{
Expand Down Expand Up @@ -187,7 +187,7 @@ $.fn.simpleLightbox = function( options )
windowHeight = $( window ).height() * options.heightRatio;
tmpImage.src = curImg.attr( 'src' );

$(tmpImage).bind('error',function(ev){
$(tmpImage).on('error',function(ev){
//no image was found
objects.eq(index).trigger($.Event('error.simplelightbox'));
animating = false;
Expand Down Expand Up @@ -340,6 +340,8 @@ $.fn.simpleLightbox = function( options )
if(mousedown) return true;
if( canTransisions ) imageLeft = parseInt( image.css( 'left' ) );
mousedown = true;
swipeDiff = 0;
swipeYDiff = 0;
swipeStart = e.originalEvent.pageX || e.originalEvent.touches[ 0 ].pageX;
swipeYStart = e.originalEvent.pageY || e.originalEvent.touches[ 0 ].pageY;
return false;
Expand Down Expand Up @@ -546,7 +548,7 @@ $.fn.simpleLightbox = function( options )
};

this.destroy = function(){
$( document ).unbind('click.'+prefix).unbind('keyup.'+prefix);
$( document ).off('click.'+prefix).off('keyup.'+prefix);
close();
$('.sl-overlay, .sl-wrapper').remove();
this.off('click');
Expand Down
4 changes: 2 additions & 2 deletions dist/simple-lightbox.min.js

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"url": "https://github.com/andreknieriem/simplelightbox.git"
},
"dependencies": {
"jquery": ">=1.3.2"
"jquery": ">=1.7.0"
},
"keywords": [
"lightbox",
Expand Down

0 comments on commit cb8dabd

Please sign in to comment.