disable right click menu on image css

Solutions on MaxInterview for disable right click menu on image css by the best coders in the world

showing results for - "disable right click menu on image css"
Julia
15 Jan 2020
1var client = {
2     init: function() {
3          var o=this;
4
5          // this will disable dragging of all images
6          $("img").mousedown(function(e){
7               e.preventDefault()
8          });
9
10          // this will disable right-click on all images
11          $("body").on("contextmenu",function(e){
12               return false;
13          });
14    }
15};