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 |
Accordion - Menu | 2,356 Kb |
Tryout_slider | 1,811 Kb |
MaintenanceFastPage | 2,608 Kb |
A Pen by Alexander Nastase | 2,142 Kb |
CSS CREATURE | 1,916 Kb |
Pressable CSS Buttons | 4,863 Kb |
Defcamp | 1,254 Kb |
Tryout_slider_done | 2,104 Kb |
Fixed menu on top when scroll | 1,599 Kb |
Layout Experimentation Animation | 1,929 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 |
Clock Face Idea | Chrisburnell | 3,196 Kb |
Resizable SASS Icons | Marianarlt | 7,611 Kb |
Mapbox Directions with geolocation tracking | Pollardld | 5,827 Kb |
Sticky notes with CSS3 | HaiNguyen007 | 2,146 Kb |
700 Synapses Per Second | Silentkrange | 2,138 Kb |
Lightrays v2 | Sinthetyc | 2,903 Kb |
Find The Penguin | Lelder | 2,212 Kb |
Speech bubbles | Something | 1,547 Kb |
Gulpfile | Aimhigherwebdesign-amy | 1,765 Kb |
Login-ng-modal | Heedoo | 3,566 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!