I have this code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script>
window.addEventListener('DOMMouseScroll', mouseWheelEvent);
window.addEventListener('mousewheel', mouseWheelEvent);
function mouseWheelEvent() {
alert(1);
}
</script>
</body>
</html>
It works in Chrome & Firefox. However, it doesn't work with my laptop dell xps 13 9434's touchpad in IE & edge. But it does work with (some) other laptops' touchpads. What to do? jQuery is no problem.
"what doesn't work?" => There is no alert in scroll when using 2 fingers like you use to scroll in browsers.
touchstart
,touchend
,touchmove
events. See mozilla docs for more details – Archetype