Blog

How to block right click using Jquery

Posted by : Leo T Abraham on 14 January, 2014

Assign the class mouseblock to the sections for which you want to disable right click and use the following function, to block right click using Jquery.

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