Have you seen the awesome, brand new modal builder yet?
Modal Builder Try it Now
We use cookies to offer you a better browsing experience. If you continue to use this site, you consent to our use of cookies.
We use cookies to offer you a better browsing experience. If you continue to use this site, you consent to our use of cookies.

ModalJS – Custom close button example

This example shows a Popup with a custom close button inside the modal content. Any object inside the modal content with class “mdl_close_btn” will act like a close button.

It also has the attribute “disable_window_scroll” set to 0 (zero) which keeps the page scrollable.

Last, it also uses the function “afterClose” which gets called when the user closes the modal.
In this case we set a cookie to save the user agrees to our terms. NOTE: If you set cookies that need to be recognized by ModalJS make sure to add the prefix “_mjs_” to the cookie name.