mousewheel event javascript code example
Example 1: javascript mousedown mouseup
<p id="myP" onmousedown="mouseDown()" onmouseup="mouseUp()">
<script>
function mouseDown() {
}
function mouseUp() {
}
</script>
Example 2: javascript mouse events
element.addEventListener("mousemove", function(event) {
console.log(event);
}); //Calls function every time the mouse moves over 'element'
Example 3: javascript detect scroll wheel
element.onscroll = function() {
// Code here
}