-
-
Save aleua/735aee86fd95dd2e2d0e1ee36c4ace2d to your computer and use it in GitHub Desktop.
jQuery to create Lightbox popup using Oxygen's Modal element
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
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