code: function(ev) {
              // Ignore left mouse clicks
              if (ev.type === 'mousedown' && ev.which !== Garnish.SECONDARY_CLICK) {
                  return;
              }
  
              if (ev.type === 'contextmenu') {
                  // Prevent the real context menu from showing
                  ev.preventDefault();
              }
  
              // Ignore if already showing
              if (this.showing && ev.currentTarget === this.currentTarget) {
                  return;
              }
  
              this.currentTarget = ev.currentTarget;
  
              if (!this.$menu) {
                  this.buildMenu();
              }
  
              this.$menu.appendTo(document.body);
              this.$menu.show();
              this.$menu.css({left: ev.pageX + 1, top: ev.pageY - 4});
  
              this.showing = true;
  
              setTimeout($.proxy(function() {
                  this.addListener(Garnish.$doc, 'mousedown', 'hideMenu');
              }, this), 0);
          }
docs: Show Menu