1//Disable mouse right click
2$("body").on("contextmenu", function(e) {
3 return false;
4});
1// for disabling right click use this as it is
2document.addEventListener('contextmenu', event => event.preventDefault());
3event.preventDefault()
1document.addEventListener('contextmenu', event => event.preventDefault());
2
3// ⇓ Test it (fiddle) ⇓
1<div>
2 This is the Phone and NO ONE SHOULD RIGHT CLICK THIS! >:) </br>
3 <img class="tlClogo" src="http://i.imgur.com/0atiS5C.jpg" style="height: 120px; width:120px;">
4 </div></br></br></br></br>
5 And this is the Keyboard, ofcourse yo can right click this :)</br>
6<img src="http://i.imgur.com/xkrKz1X.jpg" style="height: 120px; width:120px;">
7
8$('img').bind('contextmenu', function(e){
9 alert("This Logo is protected");return false;
10});