Plugin Directory

Changeset 734919


Ignore:
Timestamp:
07/02/2013 03:59:16 AM (12 years ago)
Author:
Columcille
Message:

Tagging 5.2.0 with various new options and attributes related to positioning

Location:
tippy
Files:
4 edited
6 copied

Legend:

Unmodified
Added
Removed
  • tippy/tags/5.2.0/readme.txt

    r688073 r734919  
    55Requires at least: 2.5
    66Tested up to: 3.5.1
    7 Stable tag: 5.1.2
     7Stable tag: 5.2.0
    88
    99Allows users to turn text into a tooltip or popup using a special [tippy] tag.
     
    3030== Changelog ==
    3131
     32= 5.2.0 =
     33* Added new position options for absolute and fixed position.
     34* Per-tooltip position attribute. Values: link, mouse, absolute, or fixed
     35* Added new container option to specify a css selector which should be the parent of the tooltip
     36* Per-tooltip container attribute, same purpose as new container option
     37* Per-tooltip method attribute; specify embed or append to determine how content is added to the tooltip. Embed is the traditional way; append uses the new experimental (yet soon to be default) method.
     38
    3239= 5.1.2 =
    33 = Additional tweaks for the experimental method
     40* Additional tweaks for the experimental method
    3441
    3542= 5.1.1 =
  • tippy/tags/5.2.0/tippy.js

    r688013 r734919  
    4747    this.tipOffsetX = 0;
    4848    this.tipOffsetY = 0;
     49    this.tipContainer = "body";
    4950   
    5051    // Do we fade in and out?
     
    7677    {
    7778        this.tipPosition = tipArgs.tipPosition;
     79        this.tipContainer = tipArgs.tipContainer;
    7880        this.tipOffsetX = tipArgs.tipOffsetX;
    7981        this.tipOffsetY = tipArgs.tipOffsetY;
     
    9496            .hide()
    9597            .css("display", "none")
    96             .css("position", "absolute")
    9798            .css("height", "auto")
    9899            .addClass("domTip_Tip tippy_tip")
     
    101102            .appendTo('body');
    102103
     104        if (this.tipPosition === "fixed") {
     105            this.tipBox.css('position', 'fixed');
     106        } else {
     107            this.tipBox.css('position', 'absolute');
     108        }
     109
    103110        this.tipHeader = this.jQuery("<div></div>")
    104111            .css("height", "auto")
     
    121128                this.tipBox.addClass("tippy_draggable");
    122129            }
     130        }
     131
     132        if (this.tipContainer) {
     133            var moveTip = this.tipBox.detach();
     134            this.jQuery(this.tipContainer).append(moveTip);
    123135        }
    124136    };
     
    211223       
    212224        var tipHorSide = "left", tipVertSide = "top";
    213        
     225        this.tipXloc = 0;
     226        this.tipYloc = 0;
     227
    214228        // this.tipXloc and this.tipYloc specify where the tooltip should appear.
    215229        // By default, it is just below and to the right of the mouse pointer.
    216         if (this.tipPosition === "mouse") {
     230        if (this.manPosition === "absolute") {
     231            this.tipBox.css('position', 'absolute');
     232        } else if (this.manPosition === "fixed") {
     233            this.tipBox.css('position', 'fixed');
     234        } else if (this.manPosition === "mouse" || (this.tipPosition === "mouse" && this.manPosition !== "link")) {
    217235            // Position below the mouse cursor
    218236            this.tipXloc = this.curPageX;
    219237            this.tipYloc = this.curPageY;
    220         } else if (this.tipPosition === "link") {
     238        } else if (this.manPosition === "link" || this.tipPosition === "link") {
    221239            // Position below the link
    222240            this.tipXloc = this.tipLinkX;
     
    372390            } else {
    373391                this.manOffsetY = undefined;
     392            }
     393
     394            if (tipArgs.position !== undefined) {
     395                this.manPosition = tipArgs.position;
     396            } else {
     397                this.manPosition = undefined;
    374398            }
    375399           
     
    445469                domTip_headerLink = this.jQuery("#" + this.tipId).attr('href');
    446470            }
     471
     472            if (tipArgs.container !== undefined) {
     473                this.newContainer = tipArgs.container;
     474
     475                var moveTip = this.tipBox.detach();
     476                this.jQuery(tipArgs.container).append(moveTip);
     477            } else {
     478                if (this.newContainer !== undefined) {
     479                    var moveTip = this.tipBox.detach();
     480                    this.jQuery(this.tipContainer).append(moveTip);
     481
     482                    this.newContainer = undefined;
     483                }
     484            }
    447485           
    448486            this.populateTip(this.contentText, domTip_headerText, domTip_headerLink);       
  • tippy/tags/5.2.0/tippy.php

    r688073 r734919  
    44Plugin URI: http://croberts.me/tippy/
    55Description: Simple plugin to display tooltips within your WordPress blog.
    6 Version: 5.1.2
     6Version: 5.2.0
    77Author: Chris Roberts
    88Author URI: http://croberts.me/
     
    3333    private $tipOffsetX = 0;
    3434    private $tipOffsetY = 10;
     35    private $tipOffsetXUnit = 'px';
     36    private $tipOffsetYUnit = 'px';
     37    private $tipContainer = false;
    3538    private $linkWindow = 'same';
    3639    private $sticky = 'false';
     
    143146                              'tipOffsetX' => $this->tipOffsetX,
    144147                              'tipOffsetY' => $this->tipOffsetY,
     148                              // 'tipOffsetXUnit' => $this->tipOffsetXUnit,
     149                              // 'tipOffsetYUnit' => $this->tipOffsetYUnit,
     150                              'tipContainer' => $this->tipContainer,
    145151                              'linkWindow' => $this->linkWindow,
    146152                              'sticky' => $this->sticky,
     
    223229
    224230        $useDivContent = ($this->getOption('useDivContent') === true) ? "true" : "false";
     231        $setContainer = ($this->getOption('tipContainer') === "") ? "false" : '"'. $this->getOption('tipContainer') .'"';
    225232       
    226233        echo '
     
    228235                Tippy.initialize({
    229236                    tipPosition: "'. $this->getOption("tipPosition") .'",
     237                    tipContainer: '. $setContainer .',
    230238                    tipOffsetX: '. $this->getOption("tipOffsetX") .',
    231239                    tipOffsetY: '. $this->getOption("tipOffsetY") .',
     
    278286            $this->tipOffsetX = intval($_POST['tipOffsetX']);
    279287            $this->tipOffsetY = intval($_POST['tipOffsetY']);
     288            // $this->tipOffsetX = sanitize_text_field($_POST['tipOffsetXUnit']);
     289            // $this->tipOffsetY = sanitize_text_field($_POST['tipOffsetYUnit']);
     290            $this->tipContainer = isset($_POST['tipContainer']) ? sanitize_text_field($_POST['tipContainer']) : false;
    280291            $this->linkWindow = sanitize_text_field($_POST['linkWindow']);
    281292            $this->sticky = sanitize_text_field($_POST['sticky']);
     
    322333                                          'offsetx' => false,
    323334                                          'offsety' => false,
     335                                          'position' => false,
     336                                          'method' => false,
     337                                          'container' => false,
    324338                                          'img' => false), $attributes);
    325339       
     
    355369                          'offsetx' => $tippyAtts['offsetx'],
    356370                          'offsety' => $tippyAtts['offsety'],
     371                          'position' => $tippyAtts['position'],
     372                          'method' => $tippyAtts['method'],
     373                          'container' => $tippyAtts['container'],
    357374                          'img' => $tippyAtts['img']);
    358375       
     
    407424     * 'bottom' => Optional int; specifies bottom position in pixels.
    408425     * 'right' => Optional int; specifies right position in pixels.
    409      * 'useDiv' => Optional bool; should we use the new method of inserting content?
     426     * 'position' => Optional string; specify position (link|mouse|absolute|fixed)
     427     * 'method' => Option string; specify method to load content (embed|append)
     428     * 'useDiv' => Optional bool; should we use the new method of inserting content? (deprecated)
     429     * 'container' => Optional string; css selector which specifies which element should be the parent of the tooltip
    410430     * ];
    411431    */
     
    442462        $tippyOffsetX = isset($tippyArray['offsetx']) ? $tippyArray['offsetx'] : false;
    443463        $tippyOffsetY = isset($tippyArray['offsety']) ? $tippyArray['offsety'] : false;
     464        $tippyPosition = isset($tippyArray['position']) ? $tippyArray['position'] : false;
     465        $tippyMethod = isset($tippyArray['method']) ? $tippyArray['method'] : false;
     466        $tippyContainer = isset($tippyArray['container']) ? $tippyArray['container'] : false;
    444467        $tippyImg = isset($tippyArray['img']) ? $tippyArray['img'] : false;
    445468        $tippyUseDiv = isset($tippyArray['useDiv']) ? $tippyArray['useDiv'] : false;
     
    479502
    480503            // See if we are using the experimental content method
    481             if ($this->getOption('useDivContent') === 'true' || $tippyUseDiv === true) {
     504            if (($this->getOption('useDivContent') === 'true' || $tippyUseDiv === true) && (!$tippyMethod || $tippyMethod === "append")) {
    482505                $this->addContent($tippyTitle, $tippyText, $tippyId);
    483506            } else {
     
    557580                $this->addTippyObjectValue("offsety", (int)$tippyOffsetY, "%d");
    558581            }
     582
     583            if ($tippyPosition !== false) {
     584                $this->addTippyObjectValue("position", $tippyPosition, "'%s'");
     585            }
     586
     587            if ($tippyContainer !== false) {
     588                $this->addTippyObjectValue("container", $tippyContainer, "'%s'");
     589            }
    559590           
    560591            // Check class/id
     
    565596
    566597            if (!empty($tippyName)) {
    567                 $tippyLinkName = sprintf('name="%s"', $tippyName);
     598                $tippyLinkName = 'name="'. $tippyName .'" ';
    568599            }
    569600           
     
    573604            }
    574605           
    575             $returnText = sprintf('<a %s id="%s" class="%s" %s %s %s %s="Tippy.loadTip({ %s, event: event });" %s>%s</a>', $tippyLinkName, $tippyId, $tippyLinkClass, $tippyHref, $tippyTarget, $tippyTitleAttribute, $activateTippy, $this->tippyObject, $tippyMouseOut, $tippyLinkText);
     606            $returnText = sprintf('<a '. $tippyLinkName .' id="%s" class="%s" %s %s %s %s="Tippy.loadTip({ %s, event: event });" %s>%s</a>', $tippyId, $tippyLinkClass, $tippyHref, $tippyTarget, $tippyTitleAttribute, $activateTippy, $this->tippyObject, $tippyMouseOut, $tippyLinkText);
    576607
    577608            // Clear the object
     
    589620
    590621        if (!empty($valueType)) {
    591             $this->tippyObject .= sprintf($valueName .": ". $valueType, $valueSetting);
     622            $this->tippyObject .= sprintf($valueName .": $valueType", $valueSetting);
    592623        } else {
    593624            $this->tippyObject .= $valueName .": ". $valueSetting;
  • tippy/tags/5.2.0/tippy_admin.php

    r687302 r734919  
    2929
    3030        <div class="tippyOptionSection">
    31             <div class="tippyHeader"><span>Tooltip Trigger</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" delay="900" offsetx="0" offsety="10" width="400"]Do you want the tooltip to automatically appear when a visitor hovers over the Tippy link, or should they have to click the link first?[/tippy]'); ?>)</div>
     31            <div class="tippyHeader"><span>Tooltip Trigger</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" method="embed" position="link" delay="900" offsetx="0" offsety="10" width="400"]Do you want the tooltip to automatically appear when a visitor hovers over the Tippy link, or should they have to click the link first?[/tippy]'); ?>)</div>
    3232            <div class="tippyOptions">
    3333                <input id="tippy_openTip_hover" name="openTip"  type="radio" value="hover" <?php if ($tippy->getOption('openTip') == "hover") echo "checked" ?> />
     
    4242            </div>
    4343
    44             <div class="tippyHeader"><span>Show/Hide</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" delay="900" offsetx="0" offsety="10" width="400"]Should the tooltip use a fade in/fade out effect, or should it display and hide with no fade effect?[/tippy]'); ?>)</div>
     44            <div class="tippyHeader"><span>Show/Hide</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" method="embed" position="link" delay="900" offsetx="0" offsety="10" width="400"]Should the tooltip use a fade in/fade out effect, or should it display and hide with no fade effect?[/tippy]'); ?>)</div>
    4545            <div class="tippyOptions">
    4646                <input id="tippy_fadeTip_fade" name="fadeTip"  type="radio" value="fade" <?php if ($tippy->getOption('fadeTip') == "fade") echo "checked" ?> />
     
    5555            </div>
    5656
    57             <div class="tippyHeader"><span>Fade time</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" delay="900" offsetx="0" offsety="10" width="400"]If you want to display a fade effect, how long should the fade effect last? A higher value means the tooltip will take longer to fade in/out.[/tippy]'); ?>)</div>
     57            <div class="tippyHeader"><span>Fade time</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" method="embed" position="link" delay="900" offsetx="0" offsety="10" width="400"]If you want to display a fade effect, how long should the fade effect last? A higher value means the tooltip will take longer to fade in/out.[/tippy]'); ?>)</div>
    5858            <div class="tippyOptions">
    5959                <label for="tippy_faderate">
     
    6363            </div>
    6464
    65             <div class="tippyHeader"><span>Close method</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" delay="900" offsetx="0" offsety="10" width="400"]Should the tooltip automatically disappear when the visitor mouses away, or should visitors have to manually close the tooltip? (Note, you will need to be sure to specify "Show close links" if you set this to remain sticky.)[/tippy]'); ?>)</div>
     65            <div class="tippyHeader"><span>Close method</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" method="embed" position="link" delay="900" offsetx="0" offsety="10" width="400"]Should the tooltip automatically disappear when the visitor mouses away, or should visitors have to manually close the tooltip? (Note, you will need to be sure to specify "Show close links" if you set this to remain sticky.)[/tippy]'); ?>)</div>
    6666            <div class="tippyOptions">
    6767                <input id="tippy_sticky_auto" name="sticky" type="radio" value="false" <?php if ($tippy->getOption('sticky') == "false") echo "checked" ?> />
     
    7676            </div>
    7777
    78             <div class="tippyHeader"><span>Disappear Delay</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" delay="900" offsetx="0" offsety="10" width="400"]If you selected for the tooltip to automatically close, how long should it wait before closing? This allows users to mouse away briefly without the tooltip closing right away. Set to 0 if you want it to immediately close.[/tippy]'); ?>)</div>
     78            <div class="tippyHeader"><span>Disappear Delay</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" method="embed" position="link" delay="900" offsetx="0" offsety="10" width="400"]If you selected for the tooltip to automatically close, how long should it wait before closing? This allows users to mouse away briefly without the tooltip closing right away. Set to 0 if you want it to immediately close.[/tippy]'); ?>)</div>
    7979            <div class="tippyOptions">
    8080                <label for="tippy_delay">
     
    8484            </div>
    8585
    86             <div class="tippyHeader"><span>Close Link</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" delay="900" offsetx="0" offsety="10" width="400"]Do you want to display a Close link so visitors can manually close the tooltip? If so, what should the Close link say?[/tippy]'); ?>)</div>
     86            <div class="tippyHeader"><span>Close Link</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" method="embed" position="link" delay="900" offsetx="0" offsety="10" width="400"]Do you want to display a Close link so visitors can manually close the tooltip? If so, what should the Close link say?[/tippy]'); ?>)</div>
    8787            <div class="tippyOptions">
    8888                <input id="tippy_showClose" name="showClose" type="checkbox" value="true" <?php if ($tippy->getOption('showClose') == 'true') echo "checked" ?> />
     
    9999
    100100        <div class="tippyOptionSection">       
    101             <div class="tippyHeader"><span>Link Target</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" delay="900" offsetx="0" offsety="10" width="400"]If you specify a url for your Tippy or Header link, should the url open in a new window or the same window?[/tippy]'); ?>)</div>
     101            <div class="tippyHeader"><span>Link Target</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" method="embed" position="link" delay="900" offsetx="0" offsety="10" width="400"]If you specify a url for your Tippy or Header link, should the url open in a new window or the same window?[/tippy]'); ?>)</div>
    102102            <div class="tippyOptions">
    103103                <input id="tippy_linkWindow_same" name="linkWindow" type="radio" value="same" <?php if ($tippy->getOption('linkWindow') == "same") echo "checked" ?> />
     
    112112            </div>
    113113           
    114             <div class="tippyHeader"><span>Tooltip Location</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" delay="900" offsetx="0" offsety="10" width="400"]Do you want the tooltip to appear relative to the Tippy link or relative to the mouse pointer?[/tippy]'); ?>)</div>
     114            <div class="tippyHeader"><span>Tooltip Location</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" method="embed" position="link" delay="900" offsetx="0" offsety="10" width="400"]Decide where you want the tooltip to appear. If you specify absolute or fixed, you need to set the x/y offset below or set the offset per-tooltip.[/tippy]'); ?>)</div>
    115115            <div class="tippyOptions">
    116116                <input id="tippy_tipPosition_link" name="tipPosition" type="radio" value="link" <?php if ($tippy->getOption('tipPosition') == "link") echo "checked" ?> />
     
    122122                    <label for="tippy_tipPosition_mouse">
    123123                        Tooltip positioned under the mouse pointer
    124                     </label>
     124                    </label><br />
     125
     126                <input id="tippy_tipPosition_container" name="tipPosition"  type="radio" value="absolute" <?php if ($tippy->getOption('tipPosition') == "absolute") echo "checked" ?> />
     127                    <label for="tippy_tipPosition_container">
     128                        Tooltip absolute positioned to the containing element.
     129                    </label><br />
     130
     131                <input id="tippy_tipPosition_fixed" name="tipPosition"  type="radio" value="fixed" <?php if ($tippy->getOption('tipPosition') == "fixed") echo "checked" ?> />
     132                    <label for="tippy_tipPosition_fixed">
     133                        Tooltip in a fixed position.
     134                    </label>
     135            </div>
     136
     137            <div class="tippyHeader"><span>Tooltip Container</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" method="embed" position="link" delay="900" offsetx="0" offsety="10" width="400"]By default, Tippy is located as a child of the body element. If you put a CSS selector here, Tippy will be moved inside that element. Might be useful if you switch position to absolute and set the new container to position: relative since Tippy\'s position will be determined by that element.[/tippy]'); ?>)</div>
     138            <div class="tippyOptions">
     139                <div style="display: inline-block; width: 100px;">
     140                    <label for="tippy_tipContainer">
     141                        Tippy container:
     142                    </label>
     143                </div>
     144                <input id="tippy_tipContainer" name="tipContainer" size="10" type="text" value="<?php echo $tippy->getOption('tipContainer'); ?>" /> Leave empty for default
    125145            </div>
    126146           
    127             <div class="tippyHeader"><span>Tooltip Offset</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" delay="900" offsetx="0" offsety="10" width="400"]Specify X/Y offsets if you want to nudge the tooltip around - make it display farther away from its trigger position. Give it negative values to move it up or left, positive values for right or down.[/tippy]'); ?>)</div>
     147            <div class="tippyHeader"><span>Tooltip Offset</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" method="embed" position="link" delay="900" offsetx="0" offsety="10" width="400"]Specify X/Y offsets if you want to nudge the tooltip around - make it display farther away from its trigger position. Give it negative values to move it up or left, positive values for right or down.[/tippy]'); ?>)</div>
    128148            <div class="tippyOptions">
    129149                <div style="display: inline-block; width: 100px;">
     
    132152                    </label>
    133153                </div>
    134                 <input id="tippy_tipOffsetX" name="tipOffsetX" size="3" type="text" value="<?php echo $tippy->getOption('tipOffsetX'); ?>" />px<br />
     154                <input id="tippy_tipOffsetX" name="tipOffsetX" size="3" type="text" value="<?php echo $tippy->getOption('tipOffsetX'); ?>" /> px
     155                <?php /* Possibility later on
     156                <select name="tipOffsetXUnit">
     157                    <option value="px" <?php if ($tippy->getOption('tipOffsetXUnit') == "px") { echo 'checked="checked"'; } ?>>px</option>
     158                    <option value="em" <?php if ($tippy->getOption('tipOffsetXUnit') == "em") { echo 'checked="checked"'; } ?>>em</option>
     159                    <option value="pct" <?php if ($tippy->getOption('tipOffsetXUnit') == "pct") { echo 'checked="checked"'; } ?>>pct</option>
     160                </select>
     161                */ ?>
     162                <br />
    135163               
    136164                <div style="display: inline-block; width: 100px;">
     
    139167                    </label>
    140168                </div>
    141                 <input id="tippy_tipOffsetY" name="tipOffsetY" size="3" type="text" value="<?php echo $tippy->getOption('tipOffsetY'); ?>" />px
     169                <input id="tippy_tipOffsetY" name="tipOffsetY" size="3" type="text" value="<?php echo $tippy->getOption('tipOffsetY'); ?>" /> px
     170                <?php /* Possibility later on
     171                <select name="tipOffsetYUnit">
     172                    <option value="px" <?php if ($tippy->getOption('tipOffsetYUnit') == "px") { echo 'checked="checked"'; } ?>>px</option>
     173                    <option value="em" <?php if ($tippy->getOption('tipOffsetYUnit') == "em") { echo 'checked="checked"'; } ?>>em</option>
     174                    <option value="pct" <?php if ($tippy->getOption('tipOffsetYUnit') == "pct") { echo 'checked="checked"'; } ?>>pct</option>
     175                </select>
     176                */ ?>
    142177               
    143178            </div>
    144179           
    145             <div class="tippyHeader"><span>Title Attribute</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" delay="900" offsetx="0" offsety="10" width="400"]For SEO and Accessibility best practices, it is best to add a title attribute to link elements. Most browsers display the title as a miniature tooltip (for instance, a small yellow box under the pointer). This can get in the way of Tippy. Specify whether or not you want to include a title in your Tippy links.[/tippy]'); ?>)</div>
     180            <div class="tippyHeader"><span>Title Attribute</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" method="embed" position="link" delay="900" offsetx="0" offsety="10" width="400"]For SEO and Accessibility best practices, it is best to add a title attribute to link elements. Most browsers display the title as a miniature tooltip (for instance, a small yellow box under the pointer). This can get in the way of Tippy. Specify whether or not you want to include a title in your Tippy links.[/tippy]'); ?>)</div>
    146181            <div class="tippyOptions">
    147182                <input id="tippy_showTitle" name="showTitle" type="checkbox" value="true" <?php if ($tippy->getOption('showTitle') == "true") echo "checked" ?> />
     
    151186            </div>
    152187
    153             <div class="tippyHeader"><span>Draggable Tooltips</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" delay="900" offsetx="0" offsety="10" width="400"]Uses jQuery UI. Allow users to drag tooltips around. Specify whether dragging should work from the header only or from any part of the tooltip.<br /><br />For best results, set the tooltip to sticky and limit dragging to the header.[/tippy]'); ?>)</div>
     188            <div class="tippyHeader"><span>Draggable Tooltips</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" method="embed" position="link" delay="900" offsetx="0" offsety="10" width="400"]Uses jQuery UI. Allow users to drag tooltips around. Specify whether dragging should work from the header only or from any part of the tooltip.<br /><br />For best results, set the tooltip to sticky and limit dragging to the header.[/tippy]'); ?>)</div>
    154189            <div class="tippyOptions">
    155190                <input id="tippy_dragTips" name="dragTips" type="checkbox" value="true" <?php if ($tippy->getOption('dragTips') == "true") echo "checked" ?> />
     
    164199            </div>
    165200
    166             <div class="tippyHeader"><span>Experimental</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" delay="900" offsetx="0" offsety="10" width="400"]Provides a much better method of adding your content to a Tippy tooltip. The new approach should permit a greater range of content to go inside a tooltip. If you have trouble getting certain content to display, turn this on and see if it works. Please report success or problems to <a href="mailto:[email protected]">Chris Roberts</a>.[/tippy]'); ?>)</div>
     201            <div class="tippyHeader"><span>Experimental</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" method="embed" position="link" delay="900" offsetx="0" offsety="10" width="400"]Provides a much better method of adding your content to a Tippy tooltip. The new approach should permit a greater range of content to go inside a tooltip. If you have trouble getting certain content to display, turn this on and see if it works. Please report success or problems to <a href="mailto:[email protected]">Chris Roberts</a>.[/tippy]'); ?>)</div>
    167202            <div class="tippyOptions">
    168203                <input id="tippy_useDivContent" name="useDivContent" type="checkbox" value="true" <?php if ($tippy->getOption('useDivContent') === "true") echo "checked" ?> />
  • tippy/trunk/readme.txt

    r688073 r734919  
    55Requires at least: 2.5
    66Tested up to: 3.5.1
    7 Stable tag: 5.1.2
     7Stable tag: 5.2.0
    88
    99Allows users to turn text into a tooltip or popup using a special [tippy] tag.
     
    3030== Changelog ==
    3131
     32= 5.2.0 =
     33* Added new position options for absolute and fixed position.
     34* Per-tooltip position attribute. Values: link, mouse, absolute, or fixed
     35* Added new container option to specify a css selector which should be the parent of the tooltip
     36* Per-tooltip container attribute, same purpose as new container option
     37* Per-tooltip method attribute; specify embed or append to determine how content is added to the tooltip. Embed is the traditional way; append uses the new experimental (yet soon to be default) method.
     38
    3239= 5.1.2 =
    33 = Additional tweaks for the experimental method
     40* Additional tweaks for the experimental method
    3441
    3542= 5.1.1 =
  • tippy/trunk/tippy.js

    r688013 r734919  
    4747    this.tipOffsetX = 0;
    4848    this.tipOffsetY = 0;
     49    this.tipContainer = "body";
    4950   
    5051    // Do we fade in and out?
     
    7677    {
    7778        this.tipPosition = tipArgs.tipPosition;
     79        this.tipContainer = tipArgs.tipContainer;
    7880        this.tipOffsetX = tipArgs.tipOffsetX;
    7981        this.tipOffsetY = tipArgs.tipOffsetY;
     
    9496            .hide()
    9597            .css("display", "none")
    96             .css("position", "absolute")
    9798            .css("height", "auto")
    9899            .addClass("domTip_Tip tippy_tip")
     
    101102            .appendTo('body');
    102103
     104        if (this.tipPosition === "fixed") {
     105            this.tipBox.css('position', 'fixed');
     106        } else {
     107            this.tipBox.css('position', 'absolute');
     108        }
     109
    103110        this.tipHeader = this.jQuery("<div></div>")
    104111            .css("height", "auto")
     
    121128                this.tipBox.addClass("tippy_draggable");
    122129            }
     130        }
     131
     132        if (this.tipContainer) {
     133            var moveTip = this.tipBox.detach();
     134            this.jQuery(this.tipContainer).append(moveTip);
    123135        }
    124136    };
     
    211223       
    212224        var tipHorSide = "left", tipVertSide = "top";
    213        
     225        this.tipXloc = 0;
     226        this.tipYloc = 0;
     227
    214228        // this.tipXloc and this.tipYloc specify where the tooltip should appear.
    215229        // By default, it is just below and to the right of the mouse pointer.
    216         if (this.tipPosition === "mouse") {
     230        if (this.manPosition === "absolute") {
     231            this.tipBox.css('position', 'absolute');
     232        } else if (this.manPosition === "fixed") {
     233            this.tipBox.css('position', 'fixed');
     234        } else if (this.manPosition === "mouse" || (this.tipPosition === "mouse" && this.manPosition !== "link")) {
    217235            // Position below the mouse cursor
    218236            this.tipXloc = this.curPageX;
    219237            this.tipYloc = this.curPageY;
    220         } else if (this.tipPosition === "link") {
     238        } else if (this.manPosition === "link" || this.tipPosition === "link") {
    221239            // Position below the link
    222240            this.tipXloc = this.tipLinkX;
     
    372390            } else {
    373391                this.manOffsetY = undefined;
     392            }
     393
     394            if (tipArgs.position !== undefined) {
     395                this.manPosition = tipArgs.position;
     396            } else {
     397                this.manPosition = undefined;
    374398            }
    375399           
     
    445469                domTip_headerLink = this.jQuery("#" + this.tipId).attr('href');
    446470            }
     471
     472            if (tipArgs.container !== undefined) {
     473                this.newContainer = tipArgs.container;
     474
     475                var moveTip = this.tipBox.detach();
     476                this.jQuery(tipArgs.container).append(moveTip);
     477            } else {
     478                if (this.newContainer !== undefined) {
     479                    var moveTip = this.tipBox.detach();
     480                    this.jQuery(this.tipContainer).append(moveTip);
     481
     482                    this.newContainer = undefined;
     483                }
     484            }
    447485           
    448486            this.populateTip(this.contentText, domTip_headerText, domTip_headerLink);       
  • tippy/trunk/tippy.php

    r688073 r734919  
    44Plugin URI: http://croberts.me/tippy/
    55Description: Simple plugin to display tooltips within your WordPress blog.
    6 Version: 5.1.2
     6Version: 5.2.0
    77Author: Chris Roberts
    88Author URI: http://croberts.me/
     
    3333    private $tipOffsetX = 0;
    3434    private $tipOffsetY = 10;
     35    private $tipOffsetXUnit = 'px';
     36    private $tipOffsetYUnit = 'px';
     37    private $tipContainer = false;
    3538    private $linkWindow = 'same';
    3639    private $sticky = 'false';
     
    143146                              'tipOffsetX' => $this->tipOffsetX,
    144147                              'tipOffsetY' => $this->tipOffsetY,
     148                              // 'tipOffsetXUnit' => $this->tipOffsetXUnit,
     149                              // 'tipOffsetYUnit' => $this->tipOffsetYUnit,
     150                              'tipContainer' => $this->tipContainer,
    145151                              'linkWindow' => $this->linkWindow,
    146152                              'sticky' => $this->sticky,
     
    223229
    224230        $useDivContent = ($this->getOption('useDivContent') === true) ? "true" : "false";
     231        $setContainer = ($this->getOption('tipContainer') === "") ? "false" : '"'. $this->getOption('tipContainer') .'"';
    225232       
    226233        echo '
     
    228235                Tippy.initialize({
    229236                    tipPosition: "'. $this->getOption("tipPosition") .'",
     237                    tipContainer: '. $setContainer .',
    230238                    tipOffsetX: '. $this->getOption("tipOffsetX") .',
    231239                    tipOffsetY: '. $this->getOption("tipOffsetY") .',
     
    278286            $this->tipOffsetX = intval($_POST['tipOffsetX']);
    279287            $this->tipOffsetY = intval($_POST['tipOffsetY']);
     288            // $this->tipOffsetX = sanitize_text_field($_POST['tipOffsetXUnit']);
     289            // $this->tipOffsetY = sanitize_text_field($_POST['tipOffsetYUnit']);
     290            $this->tipContainer = isset($_POST['tipContainer']) ? sanitize_text_field($_POST['tipContainer']) : false;
    280291            $this->linkWindow = sanitize_text_field($_POST['linkWindow']);
    281292            $this->sticky = sanitize_text_field($_POST['sticky']);
     
    322333                                          'offsetx' => false,
    323334                                          'offsety' => false,
     335                                          'position' => false,
     336                                          'method' => false,
     337                                          'container' => false,
    324338                                          'img' => false), $attributes);
    325339       
     
    355369                          'offsetx' => $tippyAtts['offsetx'],
    356370                          'offsety' => $tippyAtts['offsety'],
     371                          'position' => $tippyAtts['position'],
     372                          'method' => $tippyAtts['method'],
     373                          'container' => $tippyAtts['container'],
    357374                          'img' => $tippyAtts['img']);
    358375       
     
    407424     * 'bottom' => Optional int; specifies bottom position in pixels.
    408425     * 'right' => Optional int; specifies right position in pixels.
    409      * 'useDiv' => Optional bool; should we use the new method of inserting content?
     426     * 'position' => Optional string; specify position (link|mouse|absolute|fixed)
     427     * 'method' => Option string; specify method to load content (embed|append)
     428     * 'useDiv' => Optional bool; should we use the new method of inserting content? (deprecated)
     429     * 'container' => Optional string; css selector which specifies which element should be the parent of the tooltip
    410430     * ];
    411431    */
     
    442462        $tippyOffsetX = isset($tippyArray['offsetx']) ? $tippyArray['offsetx'] : false;
    443463        $tippyOffsetY = isset($tippyArray['offsety']) ? $tippyArray['offsety'] : false;
     464        $tippyPosition = isset($tippyArray['position']) ? $tippyArray['position'] : false;
     465        $tippyMethod = isset($tippyArray['method']) ? $tippyArray['method'] : false;
     466        $tippyContainer = isset($tippyArray['container']) ? $tippyArray['container'] : false;
    444467        $tippyImg = isset($tippyArray['img']) ? $tippyArray['img'] : false;
    445468        $tippyUseDiv = isset($tippyArray['useDiv']) ? $tippyArray['useDiv'] : false;
     
    479502
    480503            // See if we are using the experimental content method
    481             if ($this->getOption('useDivContent') === 'true' || $tippyUseDiv === true) {
     504            if (($this->getOption('useDivContent') === 'true' || $tippyUseDiv === true) && (!$tippyMethod || $tippyMethod === "append")) {
    482505                $this->addContent($tippyTitle, $tippyText, $tippyId);
    483506            } else {
     
    557580                $this->addTippyObjectValue("offsety", (int)$tippyOffsetY, "%d");
    558581            }
     582
     583            if ($tippyPosition !== false) {
     584                $this->addTippyObjectValue("position", $tippyPosition, "'%s'");
     585            }
     586
     587            if ($tippyContainer !== false) {
     588                $this->addTippyObjectValue("container", $tippyContainer, "'%s'");
     589            }
    559590           
    560591            // Check class/id
     
    565596
    566597            if (!empty($tippyName)) {
    567                 $tippyLinkName = sprintf('name="%s"', $tippyName);
     598                $tippyLinkName = 'name="'. $tippyName .'" ';
    568599            }
    569600           
     
    573604            }
    574605           
    575             $returnText = sprintf('<a %s id="%s" class="%s" %s %s %s %s="Tippy.loadTip({ %s, event: event });" %s>%s</a>', $tippyLinkName, $tippyId, $tippyLinkClass, $tippyHref, $tippyTarget, $tippyTitleAttribute, $activateTippy, $this->tippyObject, $tippyMouseOut, $tippyLinkText);
     606            $returnText = sprintf('<a '. $tippyLinkName .' id="%s" class="%s" %s %s %s %s="Tippy.loadTip({ %s, event: event });" %s>%s</a>', $tippyId, $tippyLinkClass, $tippyHref, $tippyTarget, $tippyTitleAttribute, $activateTippy, $this->tippyObject, $tippyMouseOut, $tippyLinkText);
    576607
    577608            // Clear the object
     
    589620
    590621        if (!empty($valueType)) {
    591             $this->tippyObject .= sprintf($valueName .": ". $valueType, $valueSetting);
     622            $this->tippyObject .= sprintf($valueName .": $valueType", $valueSetting);
    592623        } else {
    593624            $this->tippyObject .= $valueName .": ". $valueSetting;
  • tippy/trunk/tippy_admin.php

    r687302 r734919  
    2929
    3030        <div class="tippyOptionSection">
    31             <div class="tippyHeader"><span>Tooltip Trigger</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" delay="900" offsetx="0" offsety="10" width="400"]Do you want the tooltip to automatically appear when a visitor hovers over the Tippy link, or should they have to click the link first?[/tippy]'); ?>)</div>
     31            <div class="tippyHeader"><span>Tooltip Trigger</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" method="embed" position="link" delay="900" offsetx="0" offsety="10" width="400"]Do you want the tooltip to automatically appear when a visitor hovers over the Tippy link, or should they have to click the link first?[/tippy]'); ?>)</div>
    3232            <div class="tippyOptions">
    3333                <input id="tippy_openTip_hover" name="openTip"  type="radio" value="hover" <?php if ($tippy->getOption('openTip') == "hover") echo "checked" ?> />
     
    4242            </div>
    4343
    44             <div class="tippyHeader"><span>Show/Hide</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" delay="900" offsetx="0" offsety="10" width="400"]Should the tooltip use a fade in/fade out effect, or should it display and hide with no fade effect?[/tippy]'); ?>)</div>
     44            <div class="tippyHeader"><span>Show/Hide</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" method="embed" position="link" delay="900" offsetx="0" offsety="10" width="400"]Should the tooltip use a fade in/fade out effect, or should it display and hide with no fade effect?[/tippy]'); ?>)</div>
    4545            <div class="tippyOptions">
    4646                <input id="tippy_fadeTip_fade" name="fadeTip"  type="radio" value="fade" <?php if ($tippy->getOption('fadeTip') == "fade") echo "checked" ?> />
     
    5555            </div>
    5656
    57             <div class="tippyHeader"><span>Fade time</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" delay="900" offsetx="0" offsety="10" width="400"]If you want to display a fade effect, how long should the fade effect last? A higher value means the tooltip will take longer to fade in/out.[/tippy]'); ?>)</div>
     57            <div class="tippyHeader"><span>Fade time</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" method="embed" position="link" delay="900" offsetx="0" offsety="10" width="400"]If you want to display a fade effect, how long should the fade effect last? A higher value means the tooltip will take longer to fade in/out.[/tippy]'); ?>)</div>
    5858            <div class="tippyOptions">
    5959                <label for="tippy_faderate">
     
    6363            </div>
    6464
    65             <div class="tippyHeader"><span>Close method</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" delay="900" offsetx="0" offsety="10" width="400"]Should the tooltip automatically disappear when the visitor mouses away, or should visitors have to manually close the tooltip? (Note, you will need to be sure to specify "Show close links" if you set this to remain sticky.)[/tippy]'); ?>)</div>
     65            <div class="tippyHeader"><span>Close method</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" method="embed" position="link" delay="900" offsetx="0" offsety="10" width="400"]Should the tooltip automatically disappear when the visitor mouses away, or should visitors have to manually close the tooltip? (Note, you will need to be sure to specify "Show close links" if you set this to remain sticky.)[/tippy]'); ?>)</div>
    6666            <div class="tippyOptions">
    6767                <input id="tippy_sticky_auto" name="sticky" type="radio" value="false" <?php if ($tippy->getOption('sticky') == "false") echo "checked" ?> />
     
    7676            </div>
    7777
    78             <div class="tippyHeader"><span>Disappear Delay</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" delay="900" offsetx="0" offsety="10" width="400"]If you selected for the tooltip to automatically close, how long should it wait before closing? This allows users to mouse away briefly without the tooltip closing right away. Set to 0 if you want it to immediately close.[/tippy]'); ?>)</div>
     78            <div class="tippyHeader"><span>Disappear Delay</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" method="embed" position="link" delay="900" offsetx="0" offsety="10" width="400"]If you selected for the tooltip to automatically close, how long should it wait before closing? This allows users to mouse away briefly without the tooltip closing right away. Set to 0 if you want it to immediately close.[/tippy]'); ?>)</div>
    7979            <div class="tippyOptions">
    8080                <label for="tippy_delay">
     
    8484            </div>
    8585
    86             <div class="tippyHeader"><span>Close Link</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" delay="900" offsetx="0" offsety="10" width="400"]Do you want to display a Close link so visitors can manually close the tooltip? If so, what should the Close link say?[/tippy]'); ?>)</div>
     86            <div class="tippyHeader"><span>Close Link</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" method="embed" position="link" delay="900" offsetx="0" offsety="10" width="400"]Do you want to display a Close link so visitors can manually close the tooltip? If so, what should the Close link say?[/tippy]'); ?>)</div>
    8787            <div class="tippyOptions">
    8888                <input id="tippy_showClose" name="showClose" type="checkbox" value="true" <?php if ($tippy->getOption('showClose') == 'true') echo "checked" ?> />
     
    9999
    100100        <div class="tippyOptionSection">       
    101             <div class="tippyHeader"><span>Link Target</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" delay="900" offsetx="0" offsety="10" width="400"]If you specify a url for your Tippy or Header link, should the url open in a new window or the same window?[/tippy]'); ?>)</div>
     101            <div class="tippyHeader"><span>Link Target</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" method="embed" position="link" delay="900" offsetx="0" offsety="10" width="400"]If you specify a url for your Tippy or Header link, should the url open in a new window or the same window?[/tippy]'); ?>)</div>
    102102            <div class="tippyOptions">
    103103                <input id="tippy_linkWindow_same" name="linkWindow" type="radio" value="same" <?php if ($tippy->getOption('linkWindow') == "same") echo "checked" ?> />
     
    112112            </div>
    113113           
    114             <div class="tippyHeader"><span>Tooltip Location</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" delay="900" offsetx="0" offsety="10" width="400"]Do you want the tooltip to appear relative to the Tippy link or relative to the mouse pointer?[/tippy]'); ?>)</div>
     114            <div class="tippyHeader"><span>Tooltip Location</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" method="embed" position="link" delay="900" offsetx="0" offsety="10" width="400"]Decide where you want the tooltip to appear. If you specify absolute or fixed, you need to set the x/y offset below or set the offset per-tooltip.[/tippy]'); ?>)</div>
    115115            <div class="tippyOptions">
    116116                <input id="tippy_tipPosition_link" name="tipPosition" type="radio" value="link" <?php if ($tippy->getOption('tipPosition') == "link") echo "checked" ?> />
     
    122122                    <label for="tippy_tipPosition_mouse">
    123123                        Tooltip positioned under the mouse pointer
    124                     </label>
     124                    </label><br />
     125
     126                <input id="tippy_tipPosition_container" name="tipPosition"  type="radio" value="absolute" <?php if ($tippy->getOption('tipPosition') == "absolute") echo "checked" ?> />
     127                    <label for="tippy_tipPosition_container">
     128                        Tooltip absolute positioned to the containing element.
     129                    </label><br />
     130
     131                <input id="tippy_tipPosition_fixed" name="tipPosition"  type="radio" value="fixed" <?php if ($tippy->getOption('tipPosition') == "fixed") echo "checked" ?> />
     132                    <label for="tippy_tipPosition_fixed">
     133                        Tooltip in a fixed position.
     134                    </label>
     135            </div>
     136
     137            <div class="tippyHeader"><span>Tooltip Container</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" method="embed" position="link" delay="900" offsetx="0" offsety="10" width="400"]By default, Tippy is located as a child of the body element. If you put a CSS selector here, Tippy will be moved inside that element. Might be useful if you switch position to absolute and set the new container to position: relative since Tippy\'s position will be determined by that element.[/tippy]'); ?>)</div>
     138            <div class="tippyOptions">
     139                <div style="display: inline-block; width: 100px;">
     140                    <label for="tippy_tipContainer">
     141                        Tippy container:
     142                    </label>
     143                </div>
     144                <input id="tippy_tipContainer" name="tipContainer" size="10" type="text" value="<?php echo $tippy->getOption('tipContainer'); ?>" /> Leave empty for default
    125145            </div>
    126146           
    127             <div class="tippyHeader"><span>Tooltip Offset</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" delay="900" offsetx="0" offsety="10" width="400"]Specify X/Y offsets if you want to nudge the tooltip around - make it display farther away from its trigger position. Give it negative values to move it up or left, positive values for right or down.[/tippy]'); ?>)</div>
     147            <div class="tippyHeader"><span>Tooltip Offset</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" method="embed" position="link" delay="900" offsetx="0" offsety="10" width="400"]Specify X/Y offsets if you want to nudge the tooltip around - make it display farther away from its trigger position. Give it negative values to move it up or left, positive values for right or down.[/tippy]'); ?>)</div>
    128148            <div class="tippyOptions">
    129149                <div style="display: inline-block; width: 100px;">
     
    132152                    </label>
    133153                </div>
    134                 <input id="tippy_tipOffsetX" name="tipOffsetX" size="3" type="text" value="<?php echo $tippy->getOption('tipOffsetX'); ?>" />px<br />
     154                <input id="tippy_tipOffsetX" name="tipOffsetX" size="3" type="text" value="<?php echo $tippy->getOption('tipOffsetX'); ?>" /> px
     155                <?php /* Possibility later on
     156                <select name="tipOffsetXUnit">
     157                    <option value="px" <?php if ($tippy->getOption('tipOffsetXUnit') == "px") { echo 'checked="checked"'; } ?>>px</option>
     158                    <option value="em" <?php if ($tippy->getOption('tipOffsetXUnit') == "em") { echo 'checked="checked"'; } ?>>em</option>
     159                    <option value="pct" <?php if ($tippy->getOption('tipOffsetXUnit') == "pct") { echo 'checked="checked"'; } ?>>pct</option>
     160                </select>
     161                */ ?>
     162                <br />
    135163               
    136164                <div style="display: inline-block; width: 100px;">
     
    139167                    </label>
    140168                </div>
    141                 <input id="tippy_tipOffsetY" name="tipOffsetY" size="3" type="text" value="<?php echo $tippy->getOption('tipOffsetY'); ?>" />px
     169                <input id="tippy_tipOffsetY" name="tipOffsetY" size="3" type="text" value="<?php echo $tippy->getOption('tipOffsetY'); ?>" /> px
     170                <?php /* Possibility later on
     171                <select name="tipOffsetYUnit">
     172                    <option value="px" <?php if ($tippy->getOption('tipOffsetYUnit') == "px") { echo 'checked="checked"'; } ?>>px</option>
     173                    <option value="em" <?php if ($tippy->getOption('tipOffsetYUnit') == "em") { echo 'checked="checked"'; } ?>>em</option>
     174                    <option value="pct" <?php if ($tippy->getOption('tipOffsetYUnit') == "pct") { echo 'checked="checked"'; } ?>>pct</option>
     175                </select>
     176                */ ?>
    142177               
    143178            </div>
    144179           
    145             <div class="tippyHeader"><span>Title Attribute</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" delay="900" offsetx="0" offsety="10" width="400"]For SEO and Accessibility best practices, it is best to add a title attribute to link elements. Most browsers display the title as a miniature tooltip (for instance, a small yellow box under the pointer). This can get in the way of Tippy. Specify whether or not you want to include a title in your Tippy links.[/tippy]'); ?>)</div>
     180            <div class="tippyHeader"><span>Title Attribute</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" method="embed" position="link" delay="900" offsetx="0" offsety="10" width="400"]For SEO and Accessibility best practices, it is best to add a title attribute to link elements. Most browsers display the title as a miniature tooltip (for instance, a small yellow box under the pointer). This can get in the way of Tippy. Specify whether or not you want to include a title in your Tippy links.[/tippy]'); ?>)</div>
    146181            <div class="tippyOptions">
    147182                <input id="tippy_showTitle" name="showTitle" type="checkbox" value="true" <?php if ($tippy->getOption('showTitle') == "true") echo "checked" ?> />
     
    151186            </div>
    152187
    153             <div class="tippyHeader"><span>Draggable Tooltips</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" delay="900" offsetx="0" offsety="10" width="400"]Uses jQuery UI. Allow users to drag tooltips around. Specify whether dragging should work from the header only or from any part of the tooltip.<br /><br />For best results, set the tooltip to sticky and limit dragging to the header.[/tippy]'); ?>)</div>
     188            <div class="tippyHeader"><span>Draggable Tooltips</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" method="embed" position="link" delay="900" offsetx="0" offsety="10" width="400"]Uses jQuery UI. Allow users to drag tooltips around. Specify whether dragging should work from the header only or from any part of the tooltip.<br /><br />For best results, set the tooltip to sticky and limit dragging to the header.[/tippy]'); ?>)</div>
    154189            <div class="tippyOptions">
    155190                <input id="tippy_dragTips" name="dragTips" type="checkbox" value="true" <?php if ($tippy->getOption('dragTips') == "true") echo "checked" ?> />
     
    164199            </div>
    165200
    166             <div class="tippyHeader"><span>Experimental</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" delay="900" offsetx="0" offsety="10" width="400"]Provides a much better method of adding your content to a Tippy tooltip. The new approach should permit a greater range of content to go inside a tooltip. If you have trouble getting certain content to display, turn this on and see if it works. Please report success or problems to <a href="mailto:[email protected]">Chris Roberts</a>.[/tippy]'); ?>)</div>
     201            <div class="tippyHeader"><span>Experimental</span> (<?php echo do_shortcode('[tippy title="info" header="off" autoclose="true" method="embed" position="link" delay="900" offsetx="0" offsety="10" width="400"]Provides a much better method of adding your content to a Tippy tooltip. The new approach should permit a greater range of content to go inside a tooltip. If you have trouble getting certain content to display, turn this on and see if it works. Please report success or problems to <a href="mailto:[email protected]">Chris Roberts</a>.[/tippy]'); ?>)</div>
    167202            <div class="tippyOptions">
    168203                <input id="tippy_useDivContent" name="useDivContent" type="checkbox" value="true" <?php if ($tippy->getOption('useDivContent') === "true") echo "checked" ?> />
Note: See TracChangeset for help on using the changeset viewer.