Disable copy text with jQuery

This code disables context menu, cutting, copying and dragging text. Sometimes you need it. Just add the code to a page or to .js file and include it to a page.

        jQuery(document).bind("contextmenu copy cut drag",function(e){
            e.preventDefault();
            alert('Copying is not allowed on this site');
        });

 

Leave a Reply

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