Tippy free WordPress plugin
Description
Tippy free WordPress plugin
This plugin allows users to create custom popups or tooltips in their posts. The style and behavior of the tooltip are highly configurable through CSS and through the WordPress dashboard.
Shortcode Attributes
The following options can all be included as attributes in your shortcode. Default values, when applicable, are shown in parenthesis. Multiple possible values are listed in parenthesis with the default first.
Note that even though some of the attributes have changed from older versions, the old attributes should continue to work. You will not need to update shortcodes that use the old names.
autoshow (false/true): If true, the tooltip or tooltips will automatically show when the page loads.
showtitle (false/true): Whether or not to use the title attribute in links. Good for accessibility, bad for visibility.
hoverpopup (true/false): If true, tooltip displays when hovering over the link. If false, tooltip displays when the link is clicked.
showdelay (100): Adds a slight delay before displaying the tooltip to prevent popping up tooltips when the mouse moves across the page.
showspeed (200): How long it takes in ms for the tooltip to fade in.
hidespeed (200): How long it takes in ms for the tooltip to fade out.
autoclose (true/false): Whether or not the tooltip should automatically close after a delay.
hidedelay (1000): How long it takes in ms before the tooltip begins to auto fade out.
container: By default, the tooltip is placed in the DOM right where you set it but if you want to use Tippy for specific positioning, you can change its parent element by specifying a CSS selector here.
position (link/mouse/css position value): Specifies where the tooltip should be positioned. If set to link or mouse, the x and y values are automatically determined.
top: Useful when position set to fixed, absolute, or relative.
bottom: Useful when position set to fixed, absolute, or relative.
left: Useful when position set to fixed, absolute, or relative.
right: Useful when position set to fixed, absolute, or relative.
offsetx (10): Set a default horizontal offset for the tooltip position. Useful when position set to link or mouse.
offsety (10): Set a default vertical offset for the tooltip position. Useful when position set to link or mouse.
width: Specify a width for the tooltip. The default is set in jquery.tippy.css.
height: Specify a height for the tooltip. The default is set in jquery.tippy.css.
draggable (false/true): Allow visitors to drag the tooltip around. Useful when autoclose is false. Requires jQuery UI.
dragheader (true/false): If draging is enabled and this is set to true, tooltip will only be draggable from the header bar. If false, visitors can drag from any part of the tooltip.
anchor: Optional CSS selector specifying the link element that will trigger Tippy.
title: Sets the text shown on the link and in the header.
swaptitle: Alternate title to use when the visitor hovers over the link.
img: Tippy can be used with images rather than text; set img to the url of an image to display Tippy on an image.
swapimg: Like swaptitle, swapimg switches to an alternate image when a visitor hovers over the link.
href: If href is set, the Tippy link will point to this url.
target: Specifies the link target for the Tippy link.
showheader (true/false): Whether or not the tooltip should show a header.
headertitle: By default, the header is set to the tooltip title. With headertitle, you can set specific text for the title.
headerhref: If headerhref is set, the tooltip header text will be a link pointing to this url.
showclose (true/false): Whether or not the tooltip have a close link. Usefor for mobile devices or when autoclose is false.
closetext (‘close’): The text to display for the close link.
calcpos (‘parent/document’): Calculate the tooltip link position relative to its parent or to the whole document.
alttrigger: Specify an element to use as additional triggers for the tooltip. Be sure to include . or # – ie: .triggerClass or #triggerId.