-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
25 lines (23 loc) · 852 Bytes
/
script.js
File metadata and controls
25 lines (23 loc) · 852 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
// document.getElementById('next').onclick = function(){
// let lists = document.querySelectorAll('.item');
// document.getElementById('slide').appendChild(lists[0]);
// }
// document.getElementById('prev').onclick = function(){
// let lists = document.querySelectorAll('.item');
// document.getElementById('slide').prepend(lists[lists.length - 1]);
// }
gsap.registerPlugin(ScrollTrigger);
gsap.to( '.wel', {
x : "900px",
duration :5,
// duration : 2 ,
ScrollTrigger: ".box1"
})
document.getElementById('next').onclick = function(){
let lists = document.querySelectorAll('.item');
document.getElementById('slide').appendChild(lists[0]);
}
document.getElementById('prev').onclick = function(){
let lists = document.querySelectorAll('.item');
document.getElementById('slide').prepend(lists[lists.length - 1]);
}