-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
49 lines (36 loc) · 1.59 KB
/
script.js
File metadata and controls
49 lines (36 loc) · 1.59 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
document.addEventListener("DOMContentLoaded", function() {
var carouselIndex = 0;
var carouselImages = document.querySelectorAll(".carousel img");
var carouselPrev = document.querySelector(".carousel-prev");
var carouselNext = document.querySelector(".carousel-next");
function showSlide(index) {
carouselImages.forEach(function(image) {
image.classList.remove("active");
});
carouselImages[index].classList.add("active");
}
function prevSlide() {
carouselIndex = (carouselIndex - 1 + carouselImages.length) % carouselImages.length;
showSlide(carouselIndex);
}
function nextSlide() {
carouselIndex = (carouselIndex + 1) % carouselImages.length;
showSlide(carouselIndex);
}
carouselPrev.addEventListener("click", prevSlide);
carouselNext.addEventListener("click", nextSlide);
// Show the first image
showSlide(carouselIndex);
});
// document.getElementById('organizationButton').addEventListener('click', function() {
// window.open('https://github.com/ChatImproVR', '_blank');
// });
document.getElementById('documentationButton').addEventListener('click', function() {
window.open('https://github.com/ChatImproVR/chatimprovr/releases', '_blank');
});
// document.getElementById('sourceCodeButton').addEventListener('click', function() {
// window.open('https://github.com/ChatImproVR/chatimprovr', '_blank');
// });
document.getElementById('theBookButton').addEventListener('click', function() {
window.open('https://chatimprovr.github.io/The-Book/Beginner_Tutorial/beginner_plugin_development_tutorial.html', '_blank');
});