@aamasri/dialog
v1.7.12
Published
A flexible javascript popup dialog.
Maintainers
Readme
- Download & copy this package's "dist" folder into your web server's public folder eg.
public/js/dist/*. - Rename "dist" to "dialog" eg.
public/js/dialog - Load the dialog script at the end of your web page (before the closing
bodytag) like this:
<body>
...
<script src="/js/dialog/dialog.js"></script>
</body>
</html>
- When the browser loads, dialog will be attached to the browser's global window object. Use it anywhere in your scripts like this:
<button>Target</button>
<script>
dialog.open(); // Display the dialog cheat sheet
...
dialog.closeLast(); // close the on-top dialog
...
dialog.closeAll();
</script>Then import and use it in your project's ES6 modules:
function helloWorld() { dialog.open({ title: 'Greetings', source: 'Hello World' }); }
dialog.open(...});
window.setTimeout( function() {
dialog.close(dialogElement);
}, 10000);
});Dialog supports npm under the name @aamasri/dialog.
Publishing Updates
- Ananda Masri
- And awesome contributors
