Disable right click on web page using jquery

Most webmasters want to protect their blog content from plagiarism. To protect blog content from copying we can do following to things.

  1. Disable right click on web page
  2. Disable content selection

as this is not 100% full proof way to protect your content from copying, Because  these methods require JavaScript and user can disable JavaScript to copy the content.To  disable right click on web page follow these steps

Include jQuery in your web page

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>

Insert following code in head section

<script type="text/javascript">
    $(function () {
      $(document).on('contextmenu', function (e) {
        alert('Right Click is not allowed');

Liked It? Get Free updates in your Email

Delivered by feedburner

Leave a Reply

Your email address will not be published. Required fields are marked *