Modal on Load

You can add a Modal that displays on the Page Load to any Page using the following setup:

Code Example

<div class="modal-on-load" data-target="#myModal1"></div>

<!-- Modal -->
<div class="modal1 mfp-hide" id="myModal1">
	<div class="block mx-auto bg-white" style="max-width: 500px;">
		<div class="text-center p-5">
			<h3>A Simple Example of a Text Modal</h3>
			<p class="mb-0">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nostrum delectus, tenetur obcaecati porro! Expedita nostrum tempora quia provident perspiciatis inventore, autem eaque, quod explicabo, ipsum, facilis aliquid! Sapiente, possimus quo!</p>
		</div>
		<div class="section text-center m-0 p-4">
			<a href="#" class="button" onClick="$.magnificPopup.close();return false;">Close this Modal</a>
		</div>
	</div>
</div>

Settings

Private Content

You must be logged in with your Envato Account for Free in order to view this Content.

Login with Envato

Enable Cookies on Modal

Note:

To enable Cookies on Modal, simply add the data-cookies="true" Attribute to the .modal-on-load Element.

<div class="modal-on-load" data-cookies="true" data-target="#myModal1" data-delay="5000" data-timeout="7000"></div>

<!-- Modal -->
<div class="modal1 mfp-hide" id="myModal1">
	<div class="block mx-auto bg-white" style="max-width: 500px;">
		<div class="text-center p-5">
			<h3>A Simple Example of a Text Modal</h3>
			<p class="mb-0">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nostrum delectus, tenetur obcaecati porro! Expedita nostrum tempora quia provident perspiciatis inventore, autem eaque, quod explicabo, ipsum, facilis aliquid! Sapiente, possimus quo!</p>
		</div>
		<div class="section text-center m-0 p-4">
			<a href="#" class="button" onClick="$.magnificPopup.close();return false;">Close this Modal</a>
		</div>
	</div>
</div>

Last Modified: October 22, 2021