Skip to content

Commit

Permalink
Fix: Enable target attribute in caption links
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan-Kaspar Münnich committed Aug 16, 2014
1 parent a534955 commit d49077f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/lightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,11 @@
.html(this.album[this.currentImageIndex].title)
.fadeIn('fast')
.find('a').on('click', function(event){
location.href = $(this).attr('href');
if ($(this).attr('target') !== undefined) {
window.open($(this).attr('href'), $(this).attr('target'));
} else {
location.href = $(this).attr('href');
}
});
}

Expand Down

0 comments on commit d49077f

Please sign in to comment.