Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
<!DOCTYPE html>
<html>
<head>
<title>Jquery right click</title>
<meta charset="utf-8">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$('#myDiv').mousedown(function(e) {
if(e.button == 2) {
alert("Right Click!");
}
});
});
</script>
</head>
<body>
<div id="myDiv">Text</div>
</body>
</html>
$('#myDiv').live('mousedown', function(e) {
if(e.button == 2) {
alert("Right Click!");
return false;
}
});