$(document).ready(function(){ document.oncontextmenu = function() {return false;}; $(document).mousedown(function(e){ if( e.button == 2 ) { alert('Right mouse button!'); return false; } return true; }); });