jQuery Script to Disable Right Click And Control Save on your Site
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 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