Changeset 734919
- Timestamp:
- 07/02/2013 03:59:16 AM (12 years ago)
- Location:
- tippy
- Files:
-
- 4 edited
- 6 copied
Legend:
- Unmodified
- Added
- Removed
-
tippy/tags/5.2.0/readme.txt
r688073 r734919 5 5 Requires at least: 2.5 6 6 Tested up to: 3.5.1 7 Stable tag: 5. 1.27 Stable tag: 5.2.0 8 8 9 9 Allows users to turn text into a tooltip or popup using a special [tippy] tag. … … 30 30 == Changelog == 31 31 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 32 39 = 5.1.2 = 33 =Additional tweaks for the experimental method40 * Additional tweaks for the experimental method 34 41 35 42 = 5.1.1 = -
tippy/tags/5.2.0/tippy.js
r688013 r734919 47 47 this.tipOffsetX = 0; 48 48 this.tipOffsetY = 0; 49 this.tipContainer = "body"; 49 50 50 51 // Do we fade in and out? … … 76 77 { 77 78 this.tipPosition = tipArgs.tipPosition; 79 this.tipContainer = tipArgs.tipContainer; 78 80 this.tipOffsetX = tipArgs.tipOffsetX; 79 81 this.tipOffsetY = tipArgs.tipOffsetY; … … 94 96 .hide() 95 97 .css("display", "none") 96 .css("position", "absolute")97 98 .css("height", "auto") 98 99 .addClass("domTip_Tip tippy_tip") … … 101 102 .appendTo('body'); 102 103 104 if (this.tipPosition === "fixed") { 105 this.tipBox.css('position', 'fixed'); 106 } else { 107 this.tipBox.css('position', 'absolute'); 108 } 109 103 110 this.tipHeader = this.jQuery("<div></div>") 104 111 .css("height", "auto") … … 121 128 this.tipBox.addClass("tippy_draggable"); 122 129 } 130 } 131 132 if (this.tipContainer) { 133 var moveTip = this.tipBox.detach(); 134 this.jQuery(this.tipContainer).append(moveTip); 123 135 } 124 136 }; … … 211 223 212 224 var tipHorSide = "left", tipVertSide = "top"; 213 225 this.tipXloc = 0; 226 this.tipYloc = 0; 227 214 228 // this.tipXloc and this.tipYloc specify where the tooltip should appear. 215 229 // 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")) { 217 235 // Position below the mouse cursor 218 236 this.tipXloc = this.curPageX; 219 237 this.tipYloc = this.curPageY; 220 } else if (this. tipPosition === "link") {238 } else if (this.manPosition === "link" || this.tipPosition === "link") { 221 239 // Position below the link 222 240 this.tipXloc = this.tipLinkX; … … 372 390 } else { 373 391 this.manOffsetY = undefined; 392 } 393 394 if (tipArgs.position !== undefined) { 395 this.manPosition = tipArgs.position; 396 } else { 397 this.manPosition = undefined; 374 398 } 375 399 … … 445 469 domTip_headerLink = this.jQuery("#" + this.tipId).attr('href'); 446 470 } 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 } 447 485 448 486 this.populateTip(this.contentText, domTip_headerText, domTip_headerLink); -
tippy/tags/5.2.0/tippy.php
r688073 r734919 4 4 Plugin URI: http://croberts.me/tippy/ 5 5 Description: Simple plugin to display tooltips within your WordPress blog. 6 Version: 5. 1.26 Version: 5.2.0 7 7 Author: Chris Roberts 8 8 Author URI: http://croberts.me/ … … 33 33 private $tipOffsetX = 0; 34 34 private $tipOffsetY = 10; 35 private $tipOffsetXUnit = 'px'; 36 private $tipOffsetYUnit = 'px'; 37 private $tipContainer = false; 35 38 private $linkWindow = 'same'; 36 39 private $sticky = 'false'; … … 143 146 'tipOffsetX' => $this->tipOffsetX, 144 147 'tipOffsetY' => $this->tipOffsetY, 148 // 'tipOffsetXUnit' => $this->tipOffsetXUnit, 149 // 'tipOffsetYUnit' => $this->tipOffsetYUnit, 150 'tipContainer' => $this->tipContainer, 145 151 'linkWindow' => $this->linkWindow, 146 152 'sticky' => $this->sticky, … … 223 229 224 230 $useDivContent = ($this->getOption('useDivContent') === true) ? "true" : "false"; 231 $setContainer = ($this->getOption('tipContainer') === "") ? "false" : '"'. $this->getOption('tipContainer') .'"'; 225 232 226 233 echo ' … … 228 235 Tippy.initialize({ 229 236 tipPosition: "'. $this->getOption("tipPosition") .'", 237 tipContainer: '. $setContainer .', 230 238 tipOffsetX: '. $this->getOption("tipOffsetX") .', 231 239 tipOffsetY: '. $this->getOption("tipOffsetY") .', … … 278 286 $this->tipOffsetX = intval($_POST['tipOffsetX']); 279 287 $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; 280 291 $this->linkWindow = sanitize_text_field($_POST['linkWindow']); 281 292 $this->sticky = sanitize_text_field($_POST['sticky']); … … 322 333 'offsetx' => false, 323 334 'offsety' => false, 335 'position' => false, 336 'method' => false, 337 'container' => false, 324 338 'img' => false), $attributes); 325 339 … … 355 369 'offsetx' => $tippyAtts['offsetx'], 356 370 'offsety' => $tippyAtts['offsety'], 371 'position' => $tippyAtts['position'], 372 'method' => $tippyAtts['method'], 373 'container' => $tippyAtts['container'], 357 374 'img' => $tippyAtts['img']); 358 375 … … 407 424 * 'bottom' => Optional int; specifies bottom position in pixels. 408 425 * '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 410 430 * ]; 411 431 */ … … 442 462 $tippyOffsetX = isset($tippyArray['offsetx']) ? $tippyArray['offsetx'] : false; 443 463 $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; 444 467 $tippyImg = isset($tippyArray['img']) ? $tippyArray['img'] : false; 445 468 $tippyUseDiv = isset($tippyArray['useDiv']) ? $tippyArray['useDiv'] : false; … … 479 502 480 503 // 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")) { 482 505 $this->addContent($tippyTitle, $tippyText, $tippyId); 483 506 } else { … … 557 580 $this->addTippyObjectValue("offsety", (int)$tippyOffsetY, "%d"); 558 581 } 582 583 if ($tippyPosition !== false) { 584 $this->addTippyObjectValue("position", $tippyPosition, "'%s'"); 585 } 586 587 if ($tippyContainer !== false) { 588 $this->addTippyObjectValue("container", $tippyContainer, "'%s'"); 589 } 559 590 560 591 // Check class/id … … 565 596 566 597 if (!empty($tippyName)) { 567 $tippyLinkName = sprintf('name="%s"', $tippyName);598 $tippyLinkName = 'name="'. $tippyName .'" '; 568 599 } 569 600 … … 573 604 } 574 605 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); 576 607 577 608 // Clear the object … … 589 620 590 621 if (!empty($valueType)) { 591 $this->tippyObject .= sprintf($valueName .": ". $valueType, $valueSetting);622 $this->tippyObject .= sprintf($valueName .": $valueType", $valueSetting); 592 623 } else { 593 624 $this->tippyObject .= $valueName .": ". $valueSetting; -
tippy/tags/5.2.0/tippy_admin.php
r687302 r734919 29 29 30 30 <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> 32 32 <div class="tippyOptions"> 33 33 <input id="tippy_openTip_hover" name="openTip" type="radio" value="hover" <?php if ($tippy->getOption('openTip') == "hover") echo "checked" ?> /> … … 42 42 </div> 43 43 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> 45 45 <div class="tippyOptions"> 46 46 <input id="tippy_fadeTip_fade" name="fadeTip" type="radio" value="fade" <?php if ($tippy->getOption('fadeTip') == "fade") echo "checked" ?> /> … … 55 55 </div> 56 56 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> 58 58 <div class="tippyOptions"> 59 59 <label for="tippy_faderate"> … … 63 63 </div> 64 64 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> 66 66 <div class="tippyOptions"> 67 67 <input id="tippy_sticky_auto" name="sticky" type="radio" value="false" <?php if ($tippy->getOption('sticky') == "false") echo "checked" ?> /> … … 76 76 </div> 77 77 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> 79 79 <div class="tippyOptions"> 80 80 <label for="tippy_delay"> … … 84 84 </div> 85 85 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> 87 87 <div class="tippyOptions"> 88 88 <input id="tippy_showClose" name="showClose" type="checkbox" value="true" <?php if ($tippy->getOption('showClose') == 'true') echo "checked" ?> /> … … 99 99 100 100 <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> 102 102 <div class="tippyOptions"> 103 103 <input id="tippy_linkWindow_same" name="linkWindow" type="radio" value="same" <?php if ($tippy->getOption('linkWindow') == "same") echo "checked" ?> /> … … 112 112 </div> 113 113 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> 115 115 <div class="tippyOptions"> 116 116 <input id="tippy_tipPosition_link" name="tipPosition" type="radio" value="link" <?php if ($tippy->getOption('tipPosition') == "link") echo "checked" ?> /> … … 122 122 <label for="tippy_tipPosition_mouse"> 123 123 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 125 145 </div> 126 146 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> 128 148 <div class="tippyOptions"> 129 149 <div style="display: inline-block; width: 100px;"> … … 132 152 </label> 133 153 </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 /> 135 163 136 164 <div style="display: inline-block; width: 100px;"> … … 139 167 </label> 140 168 </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 */ ?> 142 177 143 178 </div> 144 179 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> 146 181 <div class="tippyOptions"> 147 182 <input id="tippy_showTitle" name="showTitle" type="checkbox" value="true" <?php if ($tippy->getOption('showTitle') == "true") echo "checked" ?> /> … … 151 186 </div> 152 187 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> 154 189 <div class="tippyOptions"> 155 190 <input id="tippy_dragTips" name="dragTips" type="checkbox" value="true" <?php if ($tippy->getOption('dragTips') == "true") echo "checked" ?> /> … … 164 199 </div> 165 200 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> 167 202 <div class="tippyOptions"> 168 203 <input id="tippy_useDivContent" name="useDivContent" type="checkbox" value="true" <?php if ($tippy->getOption('useDivContent') === "true") echo "checked" ?> /> -
tippy/trunk/readme.txt
r688073 r734919 5 5 Requires at least: 2.5 6 6 Tested up to: 3.5.1 7 Stable tag: 5. 1.27 Stable tag: 5.2.0 8 8 9 9 Allows users to turn text into a tooltip or popup using a special [tippy] tag. … … 30 30 == Changelog == 31 31 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 32 39 = 5.1.2 = 33 =Additional tweaks for the experimental method40 * Additional tweaks for the experimental method 34 41 35 42 = 5.1.1 = -
tippy/trunk/tippy.js
r688013 r734919 47 47 this.tipOffsetX = 0; 48 48 this.tipOffsetY = 0; 49 this.tipContainer = "body"; 49 50 50 51 // Do we fade in and out? … … 76 77 { 77 78 this.tipPosition = tipArgs.tipPosition; 79 this.tipContainer = tipArgs.tipContainer; 78 80 this.tipOffsetX = tipArgs.tipOffsetX; 79 81 this.tipOffsetY = tipArgs.tipOffsetY; … … 94 96 .hide() 95 97 .css("display", "none") 96 .css("position", "absolute")97 98 .css("height", "auto") 98 99 .addClass("domTip_Tip tippy_tip") … … 101 102 .appendTo('body'); 102 103 104 if (this.tipPosition === "fixed") { 105 this.tipBox.css('position', 'fixed'); 106 } else { 107 this.tipBox.css('position', 'absolute'); 108 } 109 103 110 this.tipHeader = this.jQuery("<div></div>") 104 111 .css("height", "auto") … … 121 128 this.tipBox.addClass("tippy_draggable"); 122 129 } 130 } 131 132 if (this.tipContainer) { 133 var moveTip = this.tipBox.detach(); 134 this.jQuery(this.tipContainer).append(moveTip); 123 135 } 124 136 }; … … 211 223 212 224 var tipHorSide = "left", tipVertSide = "top"; 213 225 this.tipXloc = 0; 226 this.tipYloc = 0; 227 214 228 // this.tipXloc and this.tipYloc specify where the tooltip should appear. 215 229 // 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")) { 217 235 // Position below the mouse cursor 218 236 this.tipXloc = this.curPageX; 219 237 this.tipYloc = this.curPageY; 220 } else if (this. tipPosition === "link") {238 } else if (this.manPosition === "link" || this.tipPosition === "link") { 221 239 // Position below the link 222 240 this.tipXloc = this.tipLinkX; … … 372 390 } else { 373 391 this.manOffsetY = undefined; 392 } 393 394 if (tipArgs.position !== undefined) { 395 this.manPosition = tipArgs.position; 396 } else { 397 this.manPosition = undefined; 374 398 } 375 399 … … 445 469 domTip_headerLink = this.jQuery("#" + this.tipId).attr('href'); 446 470 } 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 } 447 485 448 486 this.populateTip(this.contentText, domTip_headerText, domTip_headerLink); -
tippy/trunk/tippy.php
r688073 r734919 4 4 Plugin URI: http://croberts.me/tippy/ 5 5 Description: Simple plugin to display tooltips within your WordPress blog. 6 Version: 5. 1.26 Version: 5.2.0 7 7 Author: Chris Roberts 8 8 Author URI: http://croberts.me/ … … 33 33 private $tipOffsetX = 0; 34 34 private $tipOffsetY = 10; 35 private $tipOffsetXUnit = 'px'; 36 private $tipOffsetYUnit = 'px'; 37 private $tipContainer = false; 35 38 private $linkWindow = 'same'; 36 39 private $sticky = 'false'; … … 143 146 'tipOffsetX' => $this->tipOffsetX, 144 147 'tipOffsetY' => $this->tipOffsetY, 148 // 'tipOffsetXUnit' => $this->tipOffsetXUnit, 149 // 'tipOffsetYUnit' => $this->tipOffsetYUnit, 150 'tipContainer' => $this->tipContainer, 145 151 'linkWindow' => $this->linkWindow, 146 152 'sticky' => $this->sticky, … … 223 229 224 230 $useDivContent = ($this->getOption('useDivContent') === true) ? "true" : "false"; 231 $setContainer = ($this->getOption('tipContainer') === "") ? "false" : '"'. $this->getOption('tipContainer') .'"'; 225 232 226 233 echo ' … … 228 235 Tippy.initialize({ 229 236 tipPosition: "'. $this->getOption("tipPosition") .'", 237 tipContainer: '. $setContainer .', 230 238 tipOffsetX: '. $this->getOption("tipOffsetX") .', 231 239 tipOffsetY: '. $this->getOption("tipOffsetY") .', … … 278 286 $this->tipOffsetX = intval($_POST['tipOffsetX']); 279 287 $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; 280 291 $this->linkWindow = sanitize_text_field($_POST['linkWindow']); 281 292 $this->sticky = sanitize_text_field($_POST['sticky']); … … 322 333 'offsetx' => false, 323 334 'offsety' => false, 335 'position' => false, 336 'method' => false, 337 'container' => false, 324 338 'img' => false), $attributes); 325 339 … … 355 369 'offsetx' => $tippyAtts['offsetx'], 356 370 'offsety' => $tippyAtts['offsety'], 371 'position' => $tippyAtts['position'], 372 'method' => $tippyAtts['method'], 373 'container' => $tippyAtts['container'], 357 374 'img' => $tippyAtts['img']); 358 375 … … 407 424 * 'bottom' => Optional int; specifies bottom position in pixels. 408 425 * '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 410 430 * ]; 411 431 */ … … 442 462 $tippyOffsetX = isset($tippyArray['offsetx']) ? $tippyArray['offsetx'] : false; 443 463 $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; 444 467 $tippyImg = isset($tippyArray['img']) ? $tippyArray['img'] : false; 445 468 $tippyUseDiv = isset($tippyArray['useDiv']) ? $tippyArray['useDiv'] : false; … … 479 502 480 503 // 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")) { 482 505 $this->addContent($tippyTitle, $tippyText, $tippyId); 483 506 } else { … … 557 580 $this->addTippyObjectValue("offsety", (int)$tippyOffsetY, "%d"); 558 581 } 582 583 if ($tippyPosition !== false) { 584 $this->addTippyObjectValue("position", $tippyPosition, "'%s'"); 585 } 586 587 if ($tippyContainer !== false) { 588 $this->addTippyObjectValue("container", $tippyContainer, "'%s'"); 589 } 559 590 560 591 // Check class/id … … 565 596 566 597 if (!empty($tippyName)) { 567 $tippyLinkName = sprintf('name="%s"', $tippyName);598 $tippyLinkName = 'name="'. $tippyName .'" '; 568 599 } 569 600 … … 573 604 } 574 605 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); 576 607 577 608 // Clear the object … … 589 620 590 621 if (!empty($valueType)) { 591 $this->tippyObject .= sprintf($valueName .": ". $valueType, $valueSetting);622 $this->tippyObject .= sprintf($valueName .": $valueType", $valueSetting); 592 623 } else { 593 624 $this->tippyObject .= $valueName .": ". $valueSetting; -
tippy/trunk/tippy_admin.php
r687302 r734919 29 29 30 30 <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> 32 32 <div class="tippyOptions"> 33 33 <input id="tippy_openTip_hover" name="openTip" type="radio" value="hover" <?php if ($tippy->getOption('openTip') == "hover") echo "checked" ?> /> … … 42 42 </div> 43 43 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> 45 45 <div class="tippyOptions"> 46 46 <input id="tippy_fadeTip_fade" name="fadeTip" type="radio" value="fade" <?php if ($tippy->getOption('fadeTip') == "fade") echo "checked" ?> /> … … 55 55 </div> 56 56 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> 58 58 <div class="tippyOptions"> 59 59 <label for="tippy_faderate"> … … 63 63 </div> 64 64 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> 66 66 <div class="tippyOptions"> 67 67 <input id="tippy_sticky_auto" name="sticky" type="radio" value="false" <?php if ($tippy->getOption('sticky') == "false") echo "checked" ?> /> … … 76 76 </div> 77 77 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> 79 79 <div class="tippyOptions"> 80 80 <label for="tippy_delay"> … … 84 84 </div> 85 85 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> 87 87 <div class="tippyOptions"> 88 88 <input id="tippy_showClose" name="showClose" type="checkbox" value="true" <?php if ($tippy->getOption('showClose') == 'true') echo "checked" ?> /> … … 99 99 100 100 <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> 102 102 <div class="tippyOptions"> 103 103 <input id="tippy_linkWindow_same" name="linkWindow" type="radio" value="same" <?php if ($tippy->getOption('linkWindow') == "same") echo "checked" ?> /> … … 112 112 </div> 113 113 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> 115 115 <div class="tippyOptions"> 116 116 <input id="tippy_tipPosition_link" name="tipPosition" type="radio" value="link" <?php if ($tippy->getOption('tipPosition') == "link") echo "checked" ?> /> … … 122 122 <label for="tippy_tipPosition_mouse"> 123 123 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 125 145 </div> 126 146 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> 128 148 <div class="tippyOptions"> 129 149 <div style="display: inline-block; width: 100px;"> … … 132 152 </label> 133 153 </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 /> 135 163 136 164 <div style="display: inline-block; width: 100px;"> … … 139 167 </label> 140 168 </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 */ ?> 142 177 143 178 </div> 144 179 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> 146 181 <div class="tippyOptions"> 147 182 <input id="tippy_showTitle" name="showTitle" type="checkbox" value="true" <?php if ($tippy->getOption('showTitle') == "true") echo "checked" ?> /> … … 151 186 </div> 152 187 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> 154 189 <div class="tippyOptions"> 155 190 <input id="tippy_dragTips" name="dragTips" type="checkbox" value="true" <?php if ($tippy->getOption('dragTips') == "true") echo "checked" ?> /> … … 164 199 </div> 165 200 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> 167 202 <div class="tippyOptions"> 168 203 <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.