Simple script which demonstrates how to disable right clicks on all images on your website/page.
This tutorial is based on jQuery, so first thing We'll do - install it. There are two main methods how to do this;
- Upload Jquery library to your sever,
<!-- insert this code between head tags, after all css style-sheets -->
<!-- same between head tags -->
Now since we've got jQuery installed on the website/page, let's go ahead and write a simple script which will do the job - disable right clicks on all images and give a warning message to site's visitor.
alert("Right clicks are not permitted due to copyright settings");
// more functionality code goes here
Install this small script after main jQuery scripts or right before closing head tag. As you can see disabling default right click functionality on images allows you to add custom code or even create your own right click Context menus, but I'll leave this on your shoulders.