DayPilot.Bubble.showHtml

The showHtml() method displays the bubble with the specified HTML.

Declaration

DayPilot.Bubble.showHtml(html[, element])

Parameters

  • html (string) - HTML to be displayed in the bubble

  • element (HTMLElement) - reference DOM element

Notes

The optional element argument specifies the reference DOM element.

  • It is used as the position reference point when position is set to "Above".

  • The bubble won't be hidden automatically as long as you keep the mouse on the reference element; see also hideAfter.

Example

const bubble = new DayPilot.Bubble();
const button = document.querySelector("#bubble");

button.addEventListener("mouseenter", () => {
  bubble.showHtml("Hi there!", button);
});

button.addEventListener("mouseleave", () => {
  bubble.delayedHide();
});

See Also

DayPilot.Bubble.position

DayPilot.Bubble.hideAfter

DayPilot.Bubble Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript