我正在使用jquery v1.6.2的网站上工作。我想使用本地内容为给定类的所有锚点显示一个cluetip。但是,cluetip中的局部内容仅出现在此类的前两个锚中。我已将问题简化为以下代码:(jsfiddle here)
$(function() {
$('a.triggerxxx').cluetip({
activation: "click",
cluetipClass: "jtip",
local: true,
hideLocal: true,
sticky: true
});
});
<a class="triggerxxx" href="#" title="cluetip title" rel="div.cluetip-contentxxx">trigger text 1</a><br>
<a class="triggerxxx" href="#" title="cluetip title" rel="div.cluetip-contentxxx">trigger text 2</a><br>
<a class="triggerxxx" href="#" title="cluetip title" rel="div.cluetip-contentxxx">trigger text 3</a><br>
<a class="triggerxxx" href="#" title="cluetip title" rel="div.cluetip-contentxxx">trigger text 4</a>
<div class="cluetip-contentxxx">this content should show in all cluetips, but it only shows up in the first two</div>
是不是以这种方式工作,或者我做错了什么?
答案 0 :(得分:1)
试试这个
$(function() {
$('a.triggerxxx').each(function(index) {
$(this).cluetip({
activation: "click",
cluetipClass: "jtip",
local: true,
hideLocal: true,
sticky: true
});
});
});