简体   繁体   English

提示工具提示方向问题

[英]Tipsy Tooltip Direction Problem

I use Tipsy Tool time plugin I noticed that I cant use the same direction of the tooltip with another link. 我使用Tipsy Tool时间插件,我注意到我无法通过其他链接使用与工具提示相同的方向。

Example: 例:

javascript: javascript:

$('#south').tipsy({gravity: 's'});

html: 的HTML:

<a id='south' href='#' title='This is an example of south direction'>South</a>
<a id='south' href='#' title='This is an example of south direction2'>South</a>

Explain the example: 解释示例:

Link1 - link2 链接1-链接2

when I hover link1 the tooltip shows at the top, I want also when I hover link2 the tooltip shows at the top, 当我将link1悬停在工具提示显示在顶部时,我也希望当我将link2悬停在工具提示显示在顶部时,

But unfortunately did not work with me! 但不幸的是没有和我一起工作!

So can any one help me. 谁能帮我。

thank you 谢谢

You can't repeat IDs like this, they have to be unique in a page (otherwise you'll see side-effects, like $('#south') only returning the first match...your current issue). 您不能重复这样的ID,它们在页面中必须是唯一的(否则,您会看到副作用,例如$('#south')仅返回第一个匹配项...您当前的问题)。 Use a class instead in these cases, like this: 在这种情况下,请改用类,如下所示:

$('.south').tipsy({gravity: 's'});

The same on the links; 链接上也一样;

<a class='south' href='#' title='This is an example of south direction'>South</a>
<a class='south' href='#' title='This is an example of south direction2'>South</a>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM