javascript mousehold 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'