Namespace: Tooltiper

Tooltiper

The plugin function assigned to $.fn.tooltiper.
Below go inner helper functions inside the plugin.

Author:
License:
  • MIT
Source:

Methods


<inner> areSettingsValid( [settings])

Checks whether the settings are valid.

Parameters:
Name Type Argument Description
settings object <optional>

all the settings for the plugin.

Properties
Name Type Argument Default Description
tooltipType string <optional>
text

plain text or html.

tooltipAppearenceMode string <optional>
fadeIn

effect's name.

tooltipDisappearenceMode string <optional>
fadeOut

effect's name.

tooltipOffset number <optional>
10

distance between tooltip and element, in pixels.

tooltipBound string <optional>
element

is it bound to the element or the cursor.

tooltipShowSpeed string <optional>
fast

speed like 'fast'.

tooltipHideSpeed string <optional>
fast

speed like 'fast'.

tooltipClass string <optional>
js-tooltiper

defaults to 'js-tooltiper'.

tooltipElement string <optional>
span

defaults to span.

tooltipCss object.<string, string> <optional>

css key/value pairs styles, see the defaults in the code below.

Source:
Returns:

whether the settings are valid.

Type
boolean

<inner> createToolTip(title)

Creates tooltip element.

Parameters:
Name Type Description
title string

what will be shown in the tooltip, the content of title attribute.

Source:
Returns:

tooltip element, jQuery object.

Type
object

<inner> getPositionedParent(element)

Gets element's positioned parent.

Parameters:
Name Type Description
element object

selected element for tooltip, jQuery object.

Source:
Returns:

element's positioned parent.

Type
object

<inner> getToolTip(element)

Gets tooltip.

Parameters:
Name Type Description
element object

selected element for tooltip, jQuery object.

Source:
Returns:

tooltip element, jQuery object.

Type
object

<inner> getToolTipDimensions(tooltip)

Returns tooltip's dimensions.

Parameters:
Name Type Description
tooltip object

tooltip element, jQuery object.

Source:
Returns:

tooltip's dimensions.

Type
object.<string, number>

<inner> hideToolTip(element)

Hides the tooltip.

Parameters:
Name Type Description
element object

selected element for tooltip, jQuery object.

Source:
Returns:
Type
undefined

<inner> isToolTipShown(element)

Whether the tooltip is shown or not.

Parameters:
Name Type Description
element object

tooltip element, jQuery object.

Source:
Returns:

Whether the tooltip is shown.

Type
boolean

<inner> moveToolTip(element, event)

Moves the tooltip.

Parameters:
Name Type Description
element object

selected element for tooltip, jQuery object.

event MouseEvent

mousemove event when cursor goes over the element.

Source:
Returns:
Type
undefined

<inner> resetToolTip(element)

Cleans up a bit after the tooltip has been shown.

Parameters:
Name Type Description
element object

selected element for tooltip, jQuery object.

Source:
Returns:

the tooltip's content.

Type
string

<inner> setTooltipCoords(event, element, tooltip)

Sets tooltip coordinates.

Parameters:
Name Type Description
event MouseEvent

mouseenter event when the cursor gets over the element.

element object

selected element for tooltip, jQuery object.

tooltip object

tooltip element, jQuery object.

Source:
Returns:
Type
undefined

<inner> setTooltipWidth(tooltip)

Sets tooltip width.

Parameters:
Name Type Description
tooltip object

tooltip element, jQuery object.

Source:
Returns:
Type
undefined

<inner> showError(errs)

Displays errors in the console.

Parameters:
Name Type Description
errs Array.<Error>

array of Errors to show.

Source:
Returns:
Type
undefined

<inner> showToolTip(element, event)

Shows the tooltip around the element.

Parameters:
Name Type Description
element object

selected element for tooltip, jQuery object.

event MouseEvent

mouseenter event when cursor gets over the element.

Source:
Returns:
Type
undefined