Custom Close Button in Modal Popup

When using the “TS Modal Popup” element, the underlying lightbox script that handles the modal popup, will at least provide one close button at the bottom right corner of the screen, and if enabled, a second close button at the top right corner of the modal popup itself.

If those buttons are not sufficient for you and you want to provide your own custom close button inside the modal content, you can do so by adding an HTML element to your content and assign the class name “nch-lb-exit-custom” to it. The lightbox will automatically attach the close event for the modal popup to all elements inside the modal content that carry that class name, allowing users to close the modal popup by simply clicking on those elements.


Tekanewa has written 35 articles

Hi there, I am the Lead Developer here at Tekanewa Scripts by Kraut Coding; well, to be honest, I'm also the only developer. I love to create something beautiful and useful for Websites and here I write about how to use them. :)