Categories

.uiTooltip()

Categories: UI

.uiTooltip( [ options ] )

Subclass: ep

Inherit: (Subclass: ep) .widget()

Plugin: ep.ui.tooltip

Description: Create a tooltip.

  • .uiTooltip( [ options ] )

    version added: 6.11.0

    options   A map of additional options pass to the method.

The .uiTooltip() method create a tooltip from each element in the set of matched elements.

  • In this example a tooltip is created for the text above. The data-js attribute within a span tag is used to execute the tooltip. By hovering over the text the tooltip text appears and gets not hidden by click, because the interactive option is set to true. The parent div tag is the context element for the show/hide handling.

    Code:
    
    <div>
     some text
     <span class="Tooltip ep-js"  data-js="ep.uiTooltip({'interactive' : true, 'context':'parent'});">
      tooltip text
     </span>
    </div>
    
    
  • event

    version added: 6.11.0

    A event handle when show/hide the tooltip. Supported handles: 'click' or 'hover'

    Default: hover

  • context

    version added: 6.11.0

    A DOM element, jQuery object or selector to specify a context element for the show/hide handling.

  • interactive

    version added: 6.11.0

    A boolean indication whether to prevent hide when clicked in the tooltip.

    Default: false

  • orientation

    version added: 6.11.0

    Specify the position of the tooltip to the context element. Supported orientations: 'top', 'left', 'right', 'bottom', 'center', 'middle'. If orientation empty the context will be the cursor.

  • offsetAdjust

    version added: 6.11.0

    An array of numbers for x and y position adjust. The numbers will be intepreted as pixel.

    Default: [0,0]

  • addClass

    version added: 6.11.0

    The tooltip wraps an element around the givn element, the addClass option specifies classes to add to the wrap element.

  • showDelay

    version added: 6.11.0

    A delay duration to show the tooltip.

    Default: 200

  • hideDelay

    version added: 6.11.0

    A delay duration to hide the tooltip.

    Default: 400

  • closeButton

    version added: 6.11.2

    A boolean indication whether to add a close button to the tooltip.

    Default: false

  • show

    version added: 6.11.0

    This event is triggered when the tooltip was displayed.

  • hide

    version added: 6.11.2

    This event is triggered when the tooltip was hidden.

  • show

    • .uiTooltip( 'show', [ callback ] )

      version added: 6.11.0

      callback   A method to execute after the tooltip was displayed (after animated show).

    Call up a previously attached tooltip.

  • hide

    • .uiTooltip( 'hide', [ callback ] )

      version added: 6.11.0

      callback   A method to execute after the tooltip was hidden (after animated hide).

    Hide a previously displayed tooltip.