DayPilot.Menu.hide

The hide() method hides the context menu.

Declaration

DayPilot.Menu.hide()

Example

<button id="show">Show menu</button>

<button id="hide">Hide menu on hover</button>

<script>

var menu = new DayPilot.Menu({
  items: [
    { 
      text: "Details", 
      onClick: function(args) { alert("Name: " + args.source.name); }
    }
  ]
});

document.getElementById("show").addEventListener("click", function(e) {
  menu.show({name: "Object name"});
});

document.getElementById("hide").addEventListener("mouseover", function(e) {
  menu.hide();
});

</script>