how to disable right click on website jquery code example
Example 1: disable right click jquery
//Disable mouse right click
$("body").on("contextmenu", function(e) {
return false;
});
Example 2: enable disable click on div jquery
// To disable:
document.getElementById('id').style.pointerEvents = 'none';
// To re-enable:
document.getElementById('id').style.pointerEvents = 'auto';
// Use '' if you want to allow CSS rules to set the value