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 |
Fixed menu on top when scroll | 1,599 Kb |
Scrollbar Scrolling Progress Annotation | 2,265 Kb |
Defcamp | 1,254 Kb |
Nifty Slider | 5,012 Kb |
Layout Experimentation Animation | 1,929 Kb |
CSS CREATURE | 1,916 Kb |
Simple Tabs | 2,131 Kb |
Pressable CSS Buttons | 4,863 Kb |
A Pen by Alexander Nastase | 2,142 Kb |
Carousel_listing | 45,147 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 |
Twitch | SarahDunlap | 2,937 Kb |
GLSL Hills | Ykob | 6,991 Kb |
Pericles mi loro... | Judag | 4,125 Kb |
Hoi hoi | JohnTheCat | 7,248 Kb |
Colorful Sliders | Chanrith | 1,246 Kb |
Sass Get Function | Lukewatts | 2,155 Kb |
Popover Example | Seanboom | 2,429 Kb |
Hc first draft | Stepfray | 5,104 Kb |
Simple Buttons | Haydenmills | 1,750 Kb |
CSS3 Form Page Design | Rssatnam | 3,613 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!