Open amiga-500 opened 8 years ago
@brand404 I had this same issue, and found a workaround for it:
// first create a variable to store the lightbox once it is created
var lightbox;
// then setup the lightbox
$( 'a.nivo-lightbox' ).nivoLightbox();
// when the lightbox element is clicked, we want to assign the object to the variable
$( 'a.nivo-lightbox' ).click( function() {
lightbox = $(this).data('nivoLightbox');
} );
// now we can use an element inside the lightbox to destroy the lightbox when clicked
$( 'body' ).on( 'click', 'a.nivo-lightbox-close', function() {
lightbox.destructLightbox();
} );
can you please explain how to use this?
I notice there is no feature to close the inline lightbox besides the "X" at the top right corner. If someone wanted to have a button in the popup then it is impossible since the "X" uses a class that draws the "X" image, etc. Have an indepenent class that the user can use on their own anchors so when clicked it closes the lightbox.