cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

              	<!-- Div where i'm going to show the context menu -->
   <div id="main">


		<li>Opción 1</li>
		<li>Opción 2</li>
		<li>Opción 3</li>
		<li>Opción 4</li>
              * {
  box-sizing: border-box;

h1 {
  text-align: center;

#main {
  width: 100%;
  height: 150px;
  margin: 20px auto;
  border: 2px solid red;

ul {
  background-color: #AAAAAA;
  color: white;
  font-weight: bold;
  list-style: none;
  width: 100px;
  padding-left: 0px;
  position: absolute;

ul li {
  padding-left: 10px;
  border-top: 1px solid white;
  border-bottom: 1px solid white;
               $(function() {
      //At the beggining we hide the menu
      //Click handler for the div   
			$("#main").click(function(event) {
				 //If the code is 3 the event is
        //right click on the mouse
        if (event.which == 3 ) {
						//Show or hide the menu
           //Place the context menu where i have clicled
							"left" : event.pageX,
							"top" : event.pageY
Loading ..................