<style>
.wrapper{
overscroll-behavior: none !important;
transition: all 0s !important;
}
@media(max-width:1025px){
.scroll{
overflow-x: scroll; /*הופך את הגלילה לקרוסלה במובייל, ניתן למחוק אם אין צורך*/
}
}
</style>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.13.0/dist/gsap.min.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
gsap.registerPlugin(ScrollTrigger);
const container = document.querySelector(".scroll"); // הקלאס של הקונטיינר הפנימי
const totalWidth = container.scrollWidth;
gsap.to(container, {
x: () => (totalWidth - window.innerWidth), // במידה והאתר באנגלית ורוצים לשנות כיוון, להוסיף מינוס לפני הסוגריים
ease: "none",
scrollTrigger: {
trigger: ".wrapper", // קלאס הקונטיינר החיצונית
start: "top top",
end: () => `+=${totalWidth*1}`, // לשינוי מהירות הגלילה החליפו את הספרה 1, מספר יותר גבוה יוצר אפקט איטי יותר
scrub: true,
pin: true,
anticipatePin: 1,
markers: false
}
});
});
</script>



