Navi's

Necessity, the mother of invention

  • Visitor Map

    Locations of Site Visitors
  • Flag Counter

    free counters

Disable Right Click using jQuery

Posted by Navi's on January 20, 2011


To disable right click on web page you can do this using jQuery.

You can download jQuery Library and include it and use bellow code of snippet.


<script src="jquery.min.js" type="text/javascript"></script>

$(function() {
            $(this).bind("contextmenu", function(e) {
                e.preventDefault();
            });
        }); 

That it🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: