Vanilla JavaScript Google's MaterialDesign-like modal window
<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/fechanique/material-modal/master/material-modal.css">
<script src="https://cdn.rawgit.com/fechanique/material-modal/master/material-modal.js"></script>
//Opens a modal window with OK button
//materialAlert(title, text, callback)
materialAlert('Title', 'Content', function(result){
if(result==true) console.log('OK button pressed');
else console.log('No button was pressed');
});
//Opens a modal window with OK and CANCEL button
//materialConfirm(title, text, callback)
materialConfirm('Title', 'Content', function(result){
if(result==true) console.log('OK button pressed');
else console.log('CANCEL button was pressed or no button was pressed');
});
<html>
<head>
<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/fechanique/material-modal/master/material-modal.css">
<script src="https://cdn.rawgit.com/fechanique/material-modal/master/material-modal.js"></script>
</head>
<body>
<button onclick="materialConfirm('Title','Content',function(result){console.log(result)})">Show confirm</button>
<button onclick="materialAlert('Title','Content',function(result){console.log(result)})">Show alert</button>
</body>
</html>