0

我正在使用 Drew Wilsons Tip Tip Plugin 和修改后的方法来“显示”、“隐藏”或“销毁”一个 TipTip...

出于某种原因,我无法准备好在文档上显示的所有工具提示,但它们不会出现我想知道是否有人可以引导我朝着正确的方向前进......这是我的代码......

jQuery:

jQuery(document).ready(function($) {
$(".botpage a").tipTip({ content: "This is an anchor tag!"});
$(".botpage a").tipTip('show');
});

提示默认值

var defaults = {
        activation: "hover", // How to show (and hide) the tooltip. Can be: hover, focus, click and manual.
        keepAlive: false, // When true the tooltip won't disapper when the mouse moves away from the element. Instead it will be hidden when it leaves the tooltip.
        maxWidth: "200px", // The max-width to set on the tooltip. You may also use the option cssClass to set this.
        edgeOffset: 6, // The offset between the tooltip arrow edge and the element that has the tooltip.
        defaultPosition: "bottom", // The position of the tooltip. Can be: top, right, bottom and left.
        delay: 400, // The delay in msec to show a tooltip.
        fadeIn: 200, // The length in msec of the fade in.
        fadeOut: 200, // The length in msec of the fade out.
        attribute: "title", // The attribute to fetch the tooltip text if the option content is false.
        content: false, // HTML or String or Function (that returns HTML or String) to fill TipTIp with
        enter: function () { }, // Callback function before a tooltip is shown.
        afterEnter: function () { }, // Callback function after a tooltip is shown.
        exit: function () { }, // Callback function before a tooltip is hidden.
        afterExit: function () { }, // Callback function after a tooltip is hidden.
        cssClass: '' // CSS class that will be applied on the tooltip before showing only for this instance of tooltip.
    };

HTML

<div class="botpage">
<a>TOOLTIP YAY!</a>
</div>

我究竟做错了什么???如果您需要任何其他代码,请告诉我!

4

1 回答 1

0

啊哈。我看到了这个问题。它显示了一个工具提示。但它只显示一个。看起来该插件可能一次只能让您显示一个。请参阅此更新的小提琴:jsfiddle.net/ygswQ/1。因此,您可能需要修改源代码或使用其他工具提示插件来执行此操作。

一堆jQuery 工具提示插件。我认为最受欢迎的之一是 qtip。以下是如何在 qTip 中执行此操作的示例:http: //jsfiddle.net/GEycz/

于 2012-09-10T15:56:42.907 回答