I have recently included a CodePen demonstration
My goal is to have the lightbox close upon clicking the close button. The current issue I am facing is that the close function is only triggered when clicking on the background.
I seem to be missing something in my code.
Here are the selectors I have attempted so far, but have not successfully triggered the closing function:
$('.lightbox-item > .close-button')
$('.lightbox-item .close-button')
$('.close-button')