forked from muicss/mui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoverlay.html
More file actions
34 lines (32 loc) · 1.09 KB
/
overlay.html
File metadata and controls
34 lines (32 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="../assets/mui/css/mui.css"/>
<script src="../assets/mui/js/mui.js"></script>
<script>
window.addEventListener('load', function() {
var buttonEl = document.getElementsByClassName('mui-btn')[0];
buttonEl.addEventListener('click', function() {
var modalEl = document.createElement('div');
modalEl.style.width = '300px';
modalEl.style.height = '1000px';
modalEl.style.margin = '30px auto';
modalEl.style.backgroundColor = '#fff';
var options = {onclose: function() {console.log('onclose');}};
mui.overlay('on', options, modalEl);
});
});
</script>
</head>
<body>
<div class="mui-container">
<h1>Overlay</h1>
<div class="mui-panel">
<button class="mui-btn mui-btn--primary">Activate</button>
</div>
</div>
</body>
</html>