JSFiddle - React, Tailwind, and code Playground
by Mladen Mihajlovic
CSS
body{
width: 100%;
height: 100%;
background: red;
}
JavaScript
$(document).on("mousedown", function(event) {
if(event.which === 1){
alert("Left mouse button");
} else if (event.which === 2){
alert("Middle mouse button");
} else if (event.which === 3){
alert("Right mouse Button");
}else if (event.which === 4){
alert("mouse Button 4");
}else if (event.which === 5){
alert("mouse Button 5");
}
else alert("button " + event.which)
});