If you would like to contact me to collaborate, to resolve something, or for mentorship; please fill out the form below and I will get back to you at my earliest convenience. Thanks for reaching out.
What makes you qualified?
How can you help me?
const videoAnswers = {
answer1: "https://inspiredtoblog.com/wp-content/uploads/2024/10/response-video1.mp4",
answer2: "https://inspiredtoblog.com/wp-content/uploads/2024/10/response-video2.mp4"
};
const bubbles = document.querySelectorAll('.chat-bubble');
const videoElement = document.getElementById('myAvatarVideo');
const videoSource = videoElement.querySelector('source');
// Handle chat bubble clicks to swap video
bubbles.forEach((bubble) => {
bubble.addEventListener('click', () => {
const answerKey = bubble.getAttribute('data-answer');
const newVideoSrc = videoAnswers[answerKey];
// Swap the video source and play the new video
videoElement.pause();
videoSource.src = newVideoSrc;
videoElement.load();
videoElement.play();
});
});
// Handle closing the avatar widget
document.getElementById('closeAvatar').addEventListener('click', () => {
document.getElementById('avatar-wrapper').style.display = 'none';
});