A simple component that can be reused in a modal dialog, using only Vanilla JavaScript. There are no external frameworks or libraries.
A small Vanilla JS template library that adds a beautiful, lively, custom confirmation dialogue with Promise support for your website/web application.
vanilla js modal, vanilla js popup, how to create fancy popup window in javascript, create modal popup object, open modal using pure javascript, javascript modal
A jQuery Plugin To Create A Timed Modal Dialog
How to make use of it:
1. Insert the required JavaScript and CSS files into the doc.
<link rel="stylesheet" href="simple-modal.css" /> <script src="simple-modal.js"></script>
2. Create a new confirm dialog and attach a callback to the Promise object.
async function openModal() { this.myModal = new SimpleModal("Confirm Dialog!", "Are You Sure", "Sure!", "No"); try { const modalResponse = await myModal.question(); alert(`The response is ${modalResponse}`); } catch(err) { console.log(err); } }
3. Launch the confirm dialog.
openModal()
Confirmation Modal In Vanilla JavaScript, Creating a Simple Confirm Modal, simple dialog plugin/Github, animated modal popup using jquery
See Demo And Download
Official Website(anderpos): Click Here
This superior jQuery/javascript plugin is developed by anderpos. For extra Advanced Usages, please go to the official website.