Module for showing a tool tip when user hovers over an info button
- Source:
Properties:
Name | Type | Description |
---|---|---|
selector |
string | Selector for buttons that trigger tool tip. |
states |
object | Set of flags that can be used to toggle various tool tip states. |
template |
string | HTML template of tool tip, supporting a title, main body content, link. |
Methods
(inner) addTip($container, data, id, customCss, $boundary)
- Source:
Create a tool tip displaying provided data and append the tool tip to the designated container element
Parameters:
Name | Type | Description |
---|---|---|
$container |
element | container element |
data |
object | data to be populated into tool tip |
id |
string | tool tip id |
customCss |
string | custom css class |
$boundary |
element | optional. Apply custom css to ensure tool tip is within bound |
(inner) handleMouseEnter()
- Source:
Show tool tip on mouse enter
(inner) handleMouseLeave()
- Source:
Hide tool tip on mouse leave
(inner) init()
- Source:
Set up tool tips for designated info buttons and set up mouse event listeners for show / hiding tool tips
(inner) initItem($elem, itemId, $context)
- Source:
Set up tool tips for designated a specific button
Parameters:
Name | Type | Description |
---|---|---|
$elem |
element | button element |
itemId |
string | number | id for identifying the button element |
$context |
element | optional context for selecting mobile container for tool tip |