jquery工具 - 标签鼠标悬停 - 添加链接 [英] jquery tools - tabs mouseover - adding a link

查看:100
本文介绍了jquery工具 - 标签鼠标悬停 - 添加链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢这个工具在鼠标移动到pix上时显示文字:

I love this tool to show text when moving the mouse over the pix:

http://flowplayer.org/tools/demos/tabs/mouseover.htm

现在我正在尝试打开一个链接,当鼠标点击其中一个像素时。我试过这种方式:

Now I'm trying to open a link, when one of the pix is clicked by the mouse. I tried this way:

original: <'img src="http://static.flowplayer.org/img/commerce/commercial.png" alt="Commercial version" />'

adding link: <'a title="Mylink" href="http://mylink.com" target="_blank"><'img src="http://static.flowplayer.org/img/commerce/free.png" alt="Free version" /></a>''

[插入'以显示来源。)

[The ' are inserted to show the source only.]

使用此链接鼠标悬停不再有效。有人知道该怎么做吗?

With this link mouseover is no longer working. Does somebody know what to do there?

提前感谢您的帮助!

推荐答案

SIMPLEST解决方案:确保所有图像都包含在< a> 中。即:

SIMPLEST solution: make sure all the images are wrapped in <a>. i.e.:

<div id="products"> 
    <a href="#"><img src="http://static.flowplayer.org/img/commerce/free.png" alt="Free version" /></a>
    <a href="#"><img src="http://static.flowplayer.org/img/commerce/commercial.png" alt="Commercial version" /></a>
    <a href="#"><img src="http://static.flowplayer.org/img/commerce/multidomain.png" alt="Multidomain version" /></a>
</div> 

这很好用;我刚尝试过。我假设jQuery工具选项卡仅在您指定的容器的所有子项都是相同类型时才有效。

This works fine; I just tried it. I'm assuming that jQuery Tools Tabs only works if all the children of the container you specify are the same type.

编辑:是的,它似乎只适用于它遇到的第一种标签。例如如果您将前两个链接放在< a> 中,而不是第三个,则鼠标悬停仅适用于前两个。

yes, it seems to work only with the first type of tag it encounters. e.g. if you put the first two links in <a> and not the third, mouseover only works for the first two.

这篇关于jquery工具 - 标签鼠标悬停 - 添加链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆