How can I add a close button to the Modal Box (Lightbox) Typo3 extension?

522 Views Asked by At

I'm using Typo3 6.1 with the "Modal Content" Extension to create a lightbox which automatically opens once to give people a chance to sign up for the newsletter. But I need a close button to be able to close the Lightbox as well as a feature that allows people to click on the background outside of the lightbox to close the lightbox. So far the only way to close the Lightbox is to hit ESC, which is not enough in this case. My thought was to add an icon with a css class as a close button inside the template for the Lightbox, but I have no idea about the JS part of this. Do you know how I can make this happen, what kind of Javascript Code I have to add here in order for it to work? This is what I have so far: http://adasmarket.com/index.php?id=110

1

There are 1 best solutions below

1
On BEST ANSWER

Add this html in to your code to close the light-box

<button type="button" class="close detail-close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span></button>