jQuery Plugin to Disable Copy and Paste on Your Site

  April 20, 2013   by:  muni   1 Comment

This jQuery plugin helps you to prevent copy and paste of your post content from your blog. This mainly helps you to avoid someone from copying the your quality content.

Here is the demo page you can test it right now.

jquery script to disable selection

Demo

jquery-script-to-disable-selection

jQuery script to Disable Selection

This is very simple to add this in your blog. Just follow few steps to add it.

Step 1:

Add following jQuery plugins in the head (<head> </head>)section of the html home page.

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'></script>
<script src='https://dl.dropboxusercontent.com/u/49791983/disableSelection.js'></script>

Note:

If your are a blogger, go to html editing page. Find </head> tag and add above plugins before </head> tag.

jquery script to disable selection

Download

Step2:

Now add following script just below that.

<script>
$(document).ready(function(){
$('body').disableSelection();
});
</script>

Note: Add this jQuery library only if you never add it before in your page.

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'></script>

If you felt any difficulty implementing this please leave the comments.

  • http://mysay.in My Say

    thanks for sharing that piece of information will this work for wordpress.com hosted sites