Class GSTip
A tool tip class.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
GSTip(element, options)
Creates a new tool tip
|
| Method Attributes | Method Name and Description |
|---|---|
|
hide()
Hides the tool tip
|
|
|
setText(text)
Sets the text to display for this tool tip
|
|
|
show()
Shows the tool tip
|
Class Detail
GSTip(element, options)
Creates a new tool tip
- Parameters:
- {HTMLElement} element
- the element to set the tool tip for
- {Object} options Optional
- an object literal specifying optional configuration properties
- {boolean} options.fixed
- if
truethe tip is statically positioned relative to its owning element. If not fixed the tip will follow the mouse while its within the boundaries of the owning element (defaults tofalse) - {String} options.text
- the text to display in the tool tip. If not specified GSTip will use
the value of the elements
titleattribute if set - {int} options.showDelay
- the delay in milliseconds before the tip is shown, defaults to 100ms
- {int} options.hideDelay
- the delay in milliseconds before the tip is hidden, defaults to 100ms
- {int} options.maxDisplayChars
- the maximum number of characters that will be displayed in the tool tip
- {String} options.className
- the CSS class name to apply to the tip element, if not provided the tip will use the default style
- {GSPoint} options.offset
- the pixel offset for the tip. If the
fixedoption istruethe tip is positioned relative to the top-left corner of the owning element, otherwise it is positioned relative to the mouse position
Method Detail
hide()
Hides the tool tip
setText(text)
Sets the text to display for this tool tip
- Parameters:
- {String} text
- the text to display in the tool tip
show()
Shows the tool tip