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,528 |
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 |
Target effect | 2,163 Kb |
Tryout_slider_done | 2,104 Kb |
A Pen by Alexander Nastase | 2,142 Kb |
Fixed menu on top when scroll | 1,599 Kb |
Nifty Slider | 5,012 Kb |
Defcamp | 1,254 Kb |
Carousel_listing | 45,147 Kb |
Pressable CSS Buttons | 4,863 Kb |
Accordion - Menu | 2,356 Kb |
CSS spinning loader | 2,244 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 |
Expandable Left Side Bar with jQuery animate | Retrofuturistic | 2,483 Kb |
Collapsing Widget | Er40 | 4,279 Kb |
Michelle, submit your photography to Unsplash. | Zaneriley | 3,368 Kb |
CSS Google Now | Jackmoran | 3,196 Kb |
Css3 loader | Clknap | 2,391 Kb |
Nested table email layout | Massimo-cassandro | 2,355 Kb |
BabyStore | Pablo-Ai | 3,807 Kb |
NT Tribute | Skybutterfly | 2,850 Kb |
Basic 3D Fullscreen Transition | Apetrov | 3,270 Kb |
Weather App | Kw7oe | 3,162 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!