jquery document mousedown on id code example
Example: jquery mousedown javascript
$( "#target" ).mousedown(function() {
alert( "Handler for .mousedown() called." );
});
$( "#target" ).mousedown(function() {
alert( "Handler for .mousedown() called." );
});