-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathindex.html
93 lines (88 loc) · 3.35 KB
/
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
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WhatsApp Widget - (c) Fajar Setya Budi</title>
<link rel="stylesheet" href="dist/css/whatsapp-widget.min.css">
<style>
body {
margin: 0;
}
</style>
</head>
<body>
<!-- Non-toggleable custom form -->
<form id="billing-support" class="wa-widget-content" action="6289613866000" data-chat="billing-support">
<header class="chat-header">
<img class="chat-admin-picture" src="images/user.png">
<div class="chat-admin-details">
<h4>John Doe</h4>
<p><small>Billing Support</small></p>
</div>
</header>
<div class="chat-content">
<div class="chat-item">
<div>
<p>Lorem ipsum dolor sit, amet consectetur adipisicing elit.</p>
<p>Minima tenetur eaque fugit unde odit nobis, maxime cupiditate error beatae.</p>
<p>Dicta provident nam doloribus porro facilis perspiciatis quisquam ratione recusandae totam.</p>
</div>
</div>
</div>
<div class="chat-form">
<input data-message="name" type="text" placeholder="Your name" required>
<input data-message="email" type="email" placeholder="E-Mail">
<input data-message="message" type="text" placeholder="Your message" required>
<button class="chat-send" type="submit" data-toggle="wa-send"><strong>Send</strong></button>
</div>
</form>
<!-- End -->
<!-- Toggleable custom form -->
<style>
.whatsapp-widget {
max-width: 480px;
display: none;
}
.whatsapp-widget.expanded {
display: block;
}
</style>
<button class="button" data-toggle="wa-chat" data-target="#another-support">Toggle</button>
<form id="another-support" class="whatsapp-widget" action="6289613866000" data-chat="another-support">
<div class="wa-widget-content chat-form">
<input data-message="name" type="text" placeholder="Your name" required>
<input data-message="message" type="text" placeholder="Your message" required>
<button class="chat-send" type="submit" data-toggle="wa-send"><strong>Open Chat</strong></button>
</div>
</form>
<!-- End -->
<!-- Built in form -->
<form id="general-support" class="wa-widget" action="6289613866111" data-chat="general-support"></form>
<!-- End -->
<script src="dist/js/whatsapp-widget.min.js"></script>
<script>
var generalSupport = new WhatsAppWidget(document.getElementById('general-support'), {
name: 'Fajar Setya',
division: 'General Supports',
photo: 'images/user.png',
introduction: 'Lorem ipsum dolor sit amet consectetur adipisicing elit.'
}, [
{
data: 'name',
type: 'text',
required: true
}, {
data: 'email',
type: 'email',
required: false
}, {
data: 'message',
type: 'text',
required: true
}
]);
generalSupport.toggle()
</script>
</body>
</html>