I am using locomotive scroll (https://github.com/locomotivemtl/locomotive-scroll) to create a smooth scroll effect.
I am trying to understand the events and calls they mention in the docs (see above git url).
Example HTML:
<div data-scroll data-scroll-repeat data-scroll-speed="1" data-scroll-call="testEvent1" class="block" id="block1">
block 1
</div>
<div data-scroll data-scroll-repeat data-scroll-speed="1" data-scroll-call="testEvent2" class="block" id="block2">
block 2
</div>
Example JS:
scroll.on('call', func => {
console.log("block1 triggered");
});
This works and the consol log is fired but how can I separate "testEvent" 1 and "testEvent2" to fire separately?
Thank you!