Skip to content

Commit

Permalink
Bugfix von #25 and #27
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jan 23, 2016
1 parent a5c4a8d commit 43a79c5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ var lightbox2 = $('.lighbox-2 a').simpleLightbox();
```

### Changelog
**1.7.2 - Bugfix von #25 and #27**
**1.7.1 - Bugfix von #22 with new option alertError and merged pull request #23**
**1.7.0 - Add support for fading between photos, Bugfix for single image navigation, option for caption delay**
**1.6.0 - Option for caption position. Disable prev or next arrow if loop is false and position is first or last.**
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.7.1",
"version": "1.7.2",
"homepage": "http://andreknieriem.de/simple-lightbox",
"authors": [
"André Rinas <[email protected]> (http://andreknieriem.de)"
Expand Down
10 changes: 8 additions & 2 deletions dist/simple-lightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ $.fn.simpleLightbox = function( options )
curImg = $( '<img/>' )
.hide()
.attr('src', elem.attr('href'));
$('.sl-image').html('');
$('.sl-image').html('').attr('style','');
curImg.appendTo($('.sl-image'));
overlay.fadeIn('fast');
$('.sl-close').fadeIn('fast');
Expand All @@ -127,6 +127,7 @@ $.fn.simpleLightbox = function( options )
setTimeout( function(){ elem.trigger($.Event('shown.simplelightbox')); } ,options.animationSpeed);
},
adjustImage = function(dir){

if(!curImg.length) return;
var tmpImage = new Image(),
windowWidth = $( window ).width() * options.widthRatio,
Expand All @@ -139,7 +140,12 @@ $.fn.simpleLightbox = function( options )
if(options.alertError){
alert('Image not found, next image will be loaded');
}
loadImage(1);

if(dir == 1 || dir == -1){
loadImage(dir);
} else {
loadImage(1);
}
return;
})

Expand Down
2 changes: 1 addition & 1 deletion 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
@@ -1,6 +1,6 @@
{
"name": "simplelightbox",
"version": "1.7.1",
"version": "1.7.2",
"description": "Touch-friendly image lightbox for mobile and desktop with jQuery",
"main": "dist/simple-lightbox.js",
"repository": {
Expand Down

0 comments on commit 43a79c5

Please sign in to comment.