Hi.
I want to call easyScroll, whe youser scroll up, because at the top of the page i have an iframe, and inside i have a scroll too.
window.onscroll = function (e) {
const scrollUp = this.oldScroll > this.scrollY;
if (scrollUp && window.pageYOffset < 800) {
easyScroll({
'scrollableDomEle': window,
'direction': 'top',
'duration': 400,
'easingPreset': 'linear',
'onAnimationCompleteCallback': function () {
console.log('completed')
}
});
}
this.oldScroll = this.scrollY;
}
Bui i got "completed" 95 times.
Hi.
I want to call easyScroll, whe youser scroll up, because at the top of the page i have an iframe, and inside i have a scroll too.
Bui i got "completed" 95 times.