-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
46 lines (40 loc) · 1.47 KB
/
script.js
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
// trilho minha lista
function scrollCarousel(myListCarousel, direction) {
const carousel = document.getElementById(myListCarousel);
const scrollAmount = 300; // Ajuste conforme necessário
if (direction === 'left') {
carousel.scrollLeft -= scrollAmount;
} else if (direction === 'right') {
carousel.scrollLeft += scrollAmount;
}
}
// trilho top 10
function scrollCarousel(top10Carousel, direction) {
const carousel = document.getElementById(top10Carousel);
const scrollAmount = 300; // Ajuste conforme necessário
if (direction === 'left') {
carousel.scrollLeft -= scrollAmount;
} else if (direction === 'right') {
carousel.scrollLeft += scrollAmount;
}
}
// trilho series estrangeiras
function scrollCarousel(estrangSeriesCarousel, direction) {
const carousel = document.getElementById(estrangSeriesCarousel);
const scrollAmount = 300; // Ajuste conforme necessário
if (direction === 'left') {
carousel.scrollLeft -= scrollAmount;
} else if (direction === 'right') {
carousel.scrollLeft += scrollAmount;
}
}
// trilho series de humor
function scrollCarousel(humorCarousel, direction) {
const carousel = document.getElementById(humorCarousel);
const scrollAmount = 300;
if (direction === 'left') {
carousel.scrollLeft -= scrollAmount;
} else if (direction === 'right') {
carousel.scrollLeft += scrollAmount;
}
}