Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save cballou/cafad492b4374efe1ea0edfc7344219c to your computer and use it in GitHub Desktop.

Select an option

Save cballou/cafad492b4374efe1ea0edfc7344219c to your computer and use it in GitHub Desktop.
Example usage of the jQuery Lightweight Lightbox Plugin
// 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