Created
August 19, 2014 07:28
-
-
Save sTiLL-iLL/14fa314e17f6f82053af to your computer and use it in GitHub Desktop.
Dialog tag example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dialog> | |
<p>This is da dialog!</p> | |
<button id="close">Close</button> | |
</dialog> | |
<button id="show">Open Dialog!</button> | |
<script> | |
var dialog = document.querySelector('dialog'); | |
document.querySelector('#show').onclick = function() { | |
dialog.show(); | |
}; | |
document.querySelector('#close').onclick = function() { | |
dialog.close(); | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment