Basic Inline Content Modal In Vanilla JavaScript – Nicedialog

Category: Javascript , Modal & Popup | May 9, 2019
Author: pixelmary
Views Total: 248
Official Page: Go to website
Last Update: May 9, 2019
License: MIT

Preview:

Basic Inline Content Modal In Vanilla JavaScript – Nicedialog

Description:

Nicedialog is a minimal static modal JavaScript library to display any inline element in a popup window with zoom in/out animations.

How to use it:

Load the stylesheet nicedialog.css and JavaScript nicedialog.js in the html file.

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

Wrap your modal content into a container with the CSS class of nice-wrapper.

<div class="nice-wrapper">
  Modal Content Here
</div>

Initialize the Nicedialog.

let myDialog = new Dialog();

Show the modal.

myDialog.showModal('.nice-wrapper')

You Might Be Interested In:


Leave a Reply