So as the title says how could i do it?
After some googling i got this code together:
$('.lines').mousedown(function(event) {
if(event.which == 1){
console.log("left");
}else{
event.preventDefault();
console.log("right");
}
});
So first i need to determine which button was pushed because i’m going to use different action. but event.preventDefault for some reason doesn’t do it’s job when right mouse button is clicked.
Please try that:
Actually, it’s annoying, when you can’t use right mouse on a website.
You can disable it for any particular block in the same way:
Sample HTML:
And sample CSS:
And, finally, an example