jQuery Script to Disable Right Click And Control Save on your Site

Posted by & filed under JQUERY.

This following jQuery script help you to prevent your html page from saving as well prevent the access of html source code.

 

jQuery Script to disable right click and control save

Demo

jQuery script to disable right click and control save on your site

jQuery script to disable right click and control save on your site

jQuery script to disable right click option of browser on your html page or site.

$(document).bind('contextmenu',function(e){
       e.preventDefault();
});

or

$(document).bind('contextmenu',function(e){
       return false;
});

jQuery script to disable control + save( Ctrl+ s) option of windows OS on your html page or site.

$(window).unbind('keypress').keypress(function(event) {
   if (!(event.which == 115 && event.ctrlKey))return true;
              event.preventDefault();
	      return false;
});

 

If your non-programmer please follow this steps to add this script to your site.

Steps:

1. Find the following </body> tag in your html source code.
2. Now copy the below script and paste before closing </body> tag.

<script src='http://code.jquery.com/jquery-1.9.1.min.js'></script>
<script>
(function ($) {
          $(document).bind('contextmenu',function(e){
	       e.preventDefault();
	  });
	  $(window).unbind('keypress').keypress(function(event) {
		if (!(event.which == 115 && event.ctrlKey))return true;
			    event.preventDefault();
			    return false;
		});

}(jQuery));
</script>

 .

Download Premium Only Scripts & 80+ Demo scripts Instantly at just 1.95 USD per month + 10% discount to all Exclusive Scripts

If you want any of my script need to be customized according to your business requirement,

Please feel free to contact me [at] muni2explore[at]gmail.com

Note: But it will be charged based on your customization requirement

Get Updates, Scripts & Other Useful Resources to your Email

Join 10,000+ Happy Subscribers on feedburner. Click to Subscribe (We don't send spam)
Every Email Subsciber could have access to download 100+ demo scripts & all future scripts.

Get Instant Script Download Access!