Created
May 16, 2016 22:28
-
-
Save cballou/cafad492b4374efe1ea0edfc7344219c to your computer and use it in GitHub Desktop.
Example usage of the jQuery Lightweight Lightbox Plugin
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
// open the target element with ID "targetElement" (assumes it's already hidden by end user via style="display:none") | |
$('#targetElement').lightweight({ | |
height: 400, | |
width: 400 | |
}); | |
// to manually close the lightbox | |
$('#targetElement').lightweight('close'); | |
// an example of binding a button to close the lightbox | |
$('#targetElement a.close').on('click', function() { | |
$this.lightweight('close'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment