Skip to content

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
updated the java script for the swiper js and locomotive scroll
  • Loading branch information
swappy-2003 authored Jun 3, 2024
1 parent a9db7f7 commit 9645ee0
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion script.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const scroll = new LocomotiveScroll({
el: document.querySelector('#main'),
smooth: true
smooth: false
});

var a = document.querySelector("#elem1")
Expand All @@ -26,3 +26,22 @@ elems.forEach(function(e){
g.style.backgroundImage = `url(${image})`
})
})


function swiperAnimation() {
var swiper = new Swiper(".mySwiper", {
slidesPerView: "3",
centeredSlides: false,
spaceBetween: 120,
pagination: {
el: ".swiper-pagination",
type: "progressbar",
},
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev",
},
});
}

swiperAnimation();

0 comments on commit 9645ee0

Please sign in to comment.