close the lightbox when a user clicks on the backdrop
This commit is contained in:
parent
ea5db03bdf
commit
d94f806a50
1 changed files with 4 additions and 2 deletions
|
|
@ -43,6 +43,8 @@ jQuery.fn.center = (function() {
|
|||
evt.preventDefault();
|
||||
self.resetLightbox();
|
||||
});
|
||||
self.backdrop.click(self.resetLightbox);
|
||||
self.lightbox.click(self.resetLightbox);
|
||||
|
||||
self.body.keydown(function(evt) {
|
||||
|
||||
|
|
@ -82,7 +84,7 @@ jQuery.fn.center = (function() {
|
|||
|
||||
this.lightboxImageClicked = function(evt) {
|
||||
evt.preventDefault();
|
||||
|
||||
|
||||
var selectedImage = $(this).find("img.stream-photo"),
|
||||
imageUrl = selectedImage.attr("data-full-photo"),
|
||||
images = selectedImage.parents('.stream_element').find('img.stream-photo'),
|
||||
|
|
@ -110,7 +112,7 @@ jQuery.fn.center = (function() {
|
|||
|
||||
this.imagesetImageClicked = function(evt) {
|
||||
evt.preventDefault();
|
||||
|
||||
evt.stopPropagation();
|
||||
|
||||
self.selectImage($(this));
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue