-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
68 lines (62 loc) · 2.77 KB
/
index.html
File metadata and controls
68 lines (62 loc) · 2.77 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<html>
<head>
<!-- <link rel="stylesheet" type="text/css" href="static/css/bootstrap.min.css"> -->
<link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300" rel="stylesheet">
<script src="static/js/jquery-3.2.1.min.js"></script>
<script src="dist/vaarta.js" ></script>
<style>
.chatbox {
font-family: 'Open Sans Condensed', sans-serif;
display: block;
width: 100%;
height: 40px;
font-size: 2em;
}
</style>
</head>
<body>
<div class="chatbox">
<strong>Husband: </strong><span id="amit" ></span>
</div>
<div class="chatbox">
<strong>Wife: </strong><span id="nushi"></span>
</div>
<script>
var vaarta;
$(document).ready(function(){
vaarta = new Vaarta();
/* vaarta.add("amit", document.getElementById("amit"), {
typoEffect: true,
deleteEffect : false
});
vaarta.add("nushi", document.getElementById("nushi") , {
deleteEffect : false
});
vaarta.speak("amit", "Nushi! come I'll show you some magic.", 1000)
.speak("nushi", "what is this papa?")
.and("amit", "See I can type without touching the keyboard")
.and("nushi", "wow!. ", 1000)
.and("nushi", "How is this happening?", 5000)
.speak("amit", ":)", 8000)
.speak("amit", "I've actually written a program for this.", 100) */
vaarta.add("Husband", document.getElementById("amit"), {
typoEffect: true,
deleteEffect : false,
deleteSpeed: 0
});
vaarta.add("Wife", document.getElementById("nushi") , {
deleteEffect : false,
});
vaarta.and("Husband", "Wow! this smell is ... making me hungry")
.and("Wife", "Wait!!", 100)
.speak("Wife", "I said wait. You can't eat..", 3200)
.and("Husband", "but .. ", 300)
.and("Wife", "let's the guests take first", 300)
.speak("Husband", "come on!!", 2500)
.speak("Husband", "I'm just tasting if they're cooked well", 1000)
.and("Wife", "I cooked them", 0)
vaarta.start();
});
</script>
</body>
</html>