Initializes and returns a tooltip instance configured with the specified content and options.
DOM element.
Target DOM element.
Size of the tooltip.
A Boolean indicating whether the tooltip is currently visible.
Sets the current target.
Detaches the tooltip from its associated target and removes it from the DOM.
Hides the tooltip and removes its associated with the current target.
Returns whether the listeners are registered for the specified event name.
Hides the tooltip.
Removes a registered listener function for the specified event.
Name of the event to remove the listener for.
Handler function to remove so it won't be executed next time the event is triggered.
Registers a listener function to be executed each time an event occurs
Name of the event to listen for. Value can contain multiple event names separated by spaces to trigger the same handler function for each event name.
Handler function to be called when the event occurs
Registers a listener function to be executed the first time an event occurs.
Name of the event to listen for. Value can contain multiple event names separated by spaces to trigger the same handler function for each event name.
Handler function to be called when the event occurs
Updates the tooltip's position.
This method accepts either an x and y pixel coordinate from which to position the tooltip. Alternatively, a single DOM element argument can be provided which will be used when calculating the new position.
Sets the content, which can either be a text string or HTML string.
Shows the tooltip from the previously configured target.
To present the tooltip from a different target, call attachTo()
before showing the
tooltip.
Toggles the visibility of the tooltip.
Triggers the specified event so that all registered listeners will be executed with the specified parameters.
Event name to trigger
Generated using TypeDoc
A
Tooltip
is a component for displaying additional information or content in a popover when the target element is hovered over or clicked on.