Tooltip
Hover or focus A Tooltip
Initialization
All elements with classname env-tooltip and one child element with role="tooltip" will be automatically initialized on DOMContentLoaded.
Elements with other classnames and elements added to the DOM after document was loaded must be initialized from script. A child element with role="tooltip" is required.
Note: HTML is not allowed inside the tooltip. For advanced content, please use Popover Tooltip.
Configuration
Use data-attributes or option parameters in JavaScript for settings.
Example using data-attributes
Minimum of 8 characters
Example using JavaScript
Description of the button
Initialization of JavaScript example
Options
envision.tooltip takes two parameters:
element- You may pass any selector as a string, a DOM node or node list. Leave empty to initialize all new elements with classenv-tooltip.options- { placement, delay }placementstring- Prefered initial placement.
- Default value:
top - Possible values:
top,right,bottom,left,auto, - Possible value modifiers:
{value}-start,{value}-end
delaynumber- Milliseconds for delaying the popover opening and closing.
- Default value:
200