我正在使用 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>
我究竟做错了什么???如果您需要任何其他代码,请告诉我!