1<head>
2 <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/locomotive-scroll@3.5.4/dist/locomotive-scroll.css">
3</head>
4
5
6<div id="scrollContainer" data-scroll-container="''" class="scrollcontainer">
7
8 <div data-scroll-section="''" class="scroll-section"> //its your choice use section or div but don't style this sec or div
9
10 </div>
11
12</div>
13
14<script src="https://cdn.jsdelivr.net/npm/locomotive-scroll@4.0.4/dist/locomotive-scroll.min.js"></script>
15<script>
16 $(window).load(function() {
17 const scroller = new LocomotiveScroll({
18 el: document.querySelector("#scrollContainer"),
19 smooth: true
20 // multiplier: 2,
21//lerp: 0.1
22
23 });
24});
25</script>
1//In Header
2<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/locomotive-scroll@3.5.4/dist/locomotive-scroll.css">
3
4//In body
5<script src="https://cdn.jsdelivr.net/npm/locomotive-scroll@4.0.4/dist/locomotive-scroll.min.js"></script>
6
7<script>
8 $(window).load(function() {
9 const scroller = new LocomotiveScroll({
10 el: document.querySelector("#scrollContainer"),
11 smooth: true
12 // multiplier: 2,
13//lerp: 0.1
14
15 });
16});
17</script>
18
19
20
21
22
23
24
25