-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
34 lines (28 loc) · 915 Bytes
/
index.html
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>
<head>
<title>Dia.js Example</title>
</head>
<body>
<button id="alert">Alert</button>
<button id="confirm">Confirm</button>
<button id="prompt">Prompt</button>
<script src="dia.js"></script>
<script>
DIA.onload(function() {
$('#alert').on('click', function() {
DIA.alert('Hip Hop, Horray');
});
$('#confirm').on('click', function() {
DIA.confirm('Which type of music do you prefer?', function(value) {
console.log(value);
}, {'Hip Hop':'Hooray', 'Metal':'Burn Everything'});
});
$('#prompt').on('click', function() {
DIA.prompt('How old are you?', function(value) {
console.log(value);
}, 'my age', {'Yes, that is correct':true});
});
});
</script>
</body>
</html>