ToolTiper - globules-io/OGX.JS GitHub Wiki

(to do: add file of this)

OGX.ToolTiper is a simple component to create tooltips/help bubbles.

Instantiate

For the following example, please consider this HTML markup

 <div data-tip="Hello!"></div>
 <div data-tip="Whatever!"></div>

Now instantiate the component

 let config = {        
      container:'parent(0)', //Optional, the parent container relative to the item where the tip will be prepend to
      data:'tip', //The name of the data attribute holding the text for the tool tip
      template:_HTML_STRING_ //Optional, the template to use for the tool tip
 };
 let tooltiper = new OGX.ToolTiper(config);

Other optional attributes

 <div data-tip="Hello!" data-tip-offx="30" data-tip-offy="15" data-tip-container="parent(0)"></div>

Destroy

 tooltiper.destroy();
⚠️ **GitHub.com Fallback** ⚠️