Setup
There are 2 ways to initialise the component.
Automatic
Add data-ecl-auto-init="Tooltip" attribute to a container in your page:
<body data-ecl-auto-init="Tooltip">
...
</body>
Use the ECL library's autoInit() (ECL.autoInit()) when your page is ready or other custom event you want to hook onto.
Manual
Get target element, create an instance and invoke init().
var elt = document.body;
var Tooltip = new ECL.Tooltip(elt);
Tooltip.init();
Apply to any element
Add one of these attributes: data-ecl-tooltip, data-ecl-tooltip-inverted to your element.
They differ in style, tooltip is dark with white text, the inverted makes it white with dark text