trigger mouse down event code example
Example 1: jquery mousedown javascript
$( "#target" ).mousedown(function() {
alert( "Handler for .mousedown() called." );
});
Example 2: javascript mouse up mouse down
<p id="myP" onmousedown="mouseDown()" onmouseup="mouseUp()">
<script>
function mouseDown() {
}
function mouseUp() {
}
</script>