Right Click Menu
How do I make an right click menu?
What is a right click menu? How do you make a right click menu? This script and codes were developed by Alexander Nastase on 21 August 2022, Sunday.
Right Click Menu - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Right Click Menu</title> <script src="http://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <link rel="stylesheet" href="css/style.css">
</head>
<body> <h1>Right Click Somewhere</h1>
<ul id="context"> <li><span>Undo</span></li>
<li><span>Redo</span></li>
<li><span>Cut</span></li>
<li><span>Copy</span></li>
<li><span>Paste</span></li>
<li><span>Paste as Plain Text</span></li>
<li><span>Inspect Element</span></li>
</ul> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Right Click Menu - Script Codes CSS Codes
body { background-color: #ccc; overflow: hidden; font-family:arial; }
h1 { font-size: 2em; font-weight: bold; text-align: center; color: #fff; position: absolute; top: 50%; width: 100%; }
#context { display: none; }
#context li { position: absolute; left: 0; top: 0; -webkit-tranform: rotate(12deg); opacity: 1; transform-origin: 50% 50%; width: 10000px; text-indent: 80px; list-style:none; }
#context li span { z-index: 10; padding: 0 6px; border-radius: 3px; text-shadow: 0 0 6px White; }
#context li:hover span { cursor:pointer; background-color: #009; color: White; z-index: 100;text-shadow: 0 0 3px Black;}
Right Click Menu - Script Codes JS Codes
function setMenu(e){ $('#context').show(); $('#context li').each(function(i){ var w = $(this).width(); var h = $(this).height(); if (e) { e.preventDefault(); $(this).offset({left: e.pageX, top: e.pageY-(h/2)}); } $(this).css('transform', 'rotate('+(15*(i))+'deg)'); //$(this).css('-webkit-transform-origin', ''+e.pageX+' '+e.pageY); // $(this).css('margin-left', ''+w+'px'); });
}
$(document).bind('contextmenu', setMenu);
$(document).bind('click', function(e){ $('#context').hide();
});
$(document).ready(function(e) { setMenu(); $('#context').hide(); });

Developer | Alexander Nastase |
Username | anodpixels |
Uploaded | August 21, 2022 |
Rating | 3 |
Size | 2,252 Kb |
Views | 44,506 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Fixed menu on top when scroll | 1,599 Kb |
Old Browser Warning | 2,198 Kb |
Layout Experimentation Animation | 1,929 Kb |
Simple Tabs | 2,131 Kb |
Tryout_slider_done | 2,104 Kb |
CSS spinning loader | 2,244 Kb |
Nifty Slider | 5,012 Kb |
Tryout_slider | 1,811 Kb |
Carousel_listing | 45,147 Kb |
Accordion - Menu | 2,356 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Ball bouncing loading animation | Adam2326 | 3,144 Kb |
Loading animation - freedom purchase | Rocbear | 2,567 Kb |
Basecamp 3 Document | Lachlanjc | 3,811 Kb |
SVG Basics | HipsterBrown | 1,852 Kb |
Iron Man SVG Loading Animation | Andythayer | 3,069 Kb |
Buttons with style | Chbymnky | 2,082 Kb |
Background-blend-mode Test | 0x04 | 4,744 Kb |
CSS only simple parallax scroll | Stanssongs | 3,708 Kb |
Siema - add pagination to prototype | Pawelgrzybek | 2,575 Kb |
Content Changer | Cliffpyles | 4,538 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!