Categories
Javascript Website Design

How To Disable Right Click Using jQuery

How To Disable Right Click Using jQuery

In this post we will learn How To Disable Right Click Using jQuery.Online their are many codes available to disable right click using JavaScript but jQuery makes very easy to disable right click.For this you just have add the below given code into head section of your page.

Code:

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $(document).bind("contextmenu", function (e) {
                e.preventDefault();
            });
        });
    </script>

One reply on “How To Disable Right Click Using jQuery”

Comments are closed.