The hide() method hides the context menu.
Declaration
DayPilot.Menu.hide()Parameters
This method has no parameters.
Example
<button id="show">Show menu</button>
<button id="hide">Hide menu on hover</button>
<script>
const menu = new DayPilot.Menu({
items: [
{
text: "Details",
onClick: (args) => {
alert("Name: " + args.source.name);
}
}
],
// ...
});
document.getElementById("show").addEventListener("click", () => {
menu.show({name: "Object name"});
});
document.getElementById("hide").addEventListener("mouseover", () => {
menu.hide();
});
</script>See Also
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot