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.