Skip to content

Instantly share code, notes, and snippets.

Created February 20, 2020 13:28
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save KittenCodes/746a6ee7b0bd2cc3f34e4a059781fc5a to your computer and use it in GitHub Desktop.
jQuery to create Lightbox popup using Oxygen's Modal element
jQuery('.lightbox-trigger').click( function() {
var image = jQuery(this).attr('src');
jQuery('.lightbox-popup').css('background-image', 'url(' + image + ')');
var caption = jQuery(this).next().text();
jQuery('.lightbox-popup-caption').text( caption );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment