私は次の短いコードを持っています
<body oncontextmenu="return false">
<p class="info">
Books are the world of information. As said the books are the best friends. A wise
man always has a library of several books</p>
<ul id="contextmenu">
........
JS:
$('.info').mousedown(function (event) {
if (event.button == 2) {
$('#contextmenu').show();
}
}
.info を右クリックしたときに、ブラウザーのコンテキスト メニューがコンテキスト メニューと一緒にデフォルトとして表示されないようにします。
oncontextmenu="return false"
動作しません