-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
34 lines (28 loc) · 901 Bytes
/
script.js
File metadata and controls
34 lines (28 loc) · 901 Bytes
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
function updateHandsImg() {
var i = document.getElementById("hands-selection").value;
var id = 9 + 10 * (i - 1);
id = id.toString().padStart(5, '0');
var filename = "resources/fake-hands-generator/" + id + ".png";
document.getElementById("hands-img").src = filename;
}
// Initialisation
document.addEventListener('DOMContentLoaded', function() {
// Sliders
var sliders = document.getElementsByClassName('splide');
for (var i = 0; i < sliders.length; i++) {
new Splide(sliders[i], {
autoplay: true,
speed: 600,
rewind: true
}).mount();
}
// Tabs
var tabs = document.getElementsByClassName('tabs');
for (var i=0; i<tabs.length; i++) {
M.Tabs.init(tabs[i], {});
}
// Modals
M.Modal.init(document.querySelectorAll('.modal'), {});
// Image selection
updateHandsImg();
});