jQuery工具提示显示多个项目

时间:2012-09-19 12:08:12

标签: jquery tooltip

我正在尝试使用可用的jQuery工具提示代码在工具提示中显示多行。我能看到的所有工具提示只有一个标题属性。

我在页面上显示图像,当我将鼠标悬停在页面上时,我想显示项目的标题,价格和库存号。

我可以将它添加到我的商店代码中并以html格式返回所有这些内容,例如

<div class="image">
<a href="%mylink%" >
<img src="%myimage%" title="%mytitle%"/></a>
</div>

<div class="price">
<a href="%mylink%">%price%</a>
</div>

<div class="sku">
<a href="%mylink%">%SKU%</a>
</div>

我在标题属性上使用此工具提示工作:

http://jquerytools.org/demos/tooltip/index.html

但无法看到如何添加多个项目。这是我使用的代码:

<script>
$(function() {
// initialize tooltip
$(".image img[title]").tooltip({

   // tweak the position
   offset: [10, 2],

   // use the "slide" effect
   effect: 'slide'

// add dynamic plugin with optional configuration for bottom edge
}).dynamic({ bottom: { direction: 'down', bounce: true } });
});
</script>

有可能吗?提前感谢您的帮助。

0 个答案:

没有答案