I use two events (scroll and mousewheel).
I would like to get deltaY for mousewheel event to control a slider.
The variable getDelta returns numbers and undefined despite of my condition on mousewheel event.
I would like to get deltaY values outside.
What's wrong please ? Thank you in advance.
$(window).on('scroll mousewheel', function(e) {
if (e.type == "mousewheel") {
var getDelta = e.deltaY;
}
console.log(getDelta);
}
