2010-11-30 55 views
0

我使用Tipsy Tool时间插件我发现我不能使用与另一个链接相同的工具提示方向。Tipsy Tooltip Direction问题

实施例:

的javascript:

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

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> 

解释例如:

链接1 - LINK2

当我悬停LINK1吨他的工具提示显示在顶部, 我还希望当我悬停链接2时,工具提示显示在顶部,

但是不幸的是我没有工作!

所以任何人都可以帮助我。

谢谢

回答

1

你不能重复的ID喜欢这一点,他们必须在一个页面独特的(否则你会看到的副作用,如$('#south')只返回第一场比赛...你目前的问题)。在这些情况下使用班级,如下所示:

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

链接上相同;

<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> 
+0

感谢您的回复我尝试了您的解决方案, – Swell 2010-11-30 20:48:59