简体   繁体   中英

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

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

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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM