Created
May 22, 2015 12:03
-
-
Save Korveld/3af0284eb4b6d1aafd4c to your computer and use it in GitHub Desktop.
Lightbox js file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var $overlay = $('.overlay'); | |
var $lightbox = $('.lightbox'); | |
$('#elementId').click(function(event) { | |
$overlay.fadeIn(300); | |
$lightbox.fadeIn(300); | |
event.preventDefault(); | |
}); | |
$overlay.click(function() { | |
$(this).fadeOut(300); | |
$lightbox.fadeOut(300); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment