-
Notifications
You must be signed in to change notification settings - Fork 2
/
chatbot.html
45 lines (41 loc) · 1.52 KB
/
chatbot.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Chatbot Assistance</title>
<link rel="stylesheet" href="chatbot.css">
</head>
<body>
<button id="chatbot-toggle" class="chatbot-button">Chat with Us</button>
<div id="chatbot-overlay" class="overlay">
<div class="chatbot-content">
<div class="chatbot-header">
Chatbot Assistant
<span class="chatbot-close-btn" onclick="toggleChatbot()">X</span>
</div>
<div id="chatbot-messages" class="chatbot-messages">
<!-- This is where the chat messages will be displayed -->
</div>
<div class="chatbot-input-area">
<input type="text" id="chatbot-input" placeholder="Type your message..." />
<button id="chatbot-send-btn">Send</button>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="frontjs.js"></script>
<script>
// Toggle the visibility of the chatbot overlay
$('#chatbot-toggle').click(function() {
$('#chatbot-overlay').toggle();
});
function toggleChatbot() {
$('#chatbot-overlay').toggle(); // This will also hide/show the overlay
}
// Close button functionality
$('.chatbot-close-btn').click(function() {
$('#chatbot-overlay').hide(); // Hide the overlay when the close button is clicked
});
</script>
</body>
</html>