Skip to content

Commit

Permalink
Merge pull request #299 from janmuennich/master
Browse files Browse the repository at this point in the history
Fix: Enable target attribute in caption links
  • Loading branch information
lokesh committed Jun 15, 2015
2 parents f4ca120 + d49077f commit 556a152
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 556a152

Please sign in to comment.