Minimal Modal Popup For Inline Content – Modal.js

Category: Javascript , Modal & Popup | October 10, 2020
Views Total:270 views
Official Page:Go to website
Last Update:October 10, 2020


Minimal Modal Popup For Inline Content – Modal.js


A minimal JavaScript library to show inline content in an animated, modal-style popup window.

How to use it:

1. Create the content for the modal and make it invisible on page load.

<div id="modalContent" style="display:none">
 <h2>Modal Title</h2>
 <p>Modal Content Here</p>

2. Load the modal.css and modal.js from the dist folder.

<link rel="stylesheet" href="src/modal.css" />
<script src="src/modal.js"></script>

3. Launch the modal window when needed.'modalContent');

4. Close the modal window manually.


You Might Be Interested In:

Leave a Reply