0

我正在使用 Fancybox 插件。( http://fancyapps.com/fancybox/ )

有一个选项可以为每个添加的“a”标签添加“标题”,当用户打开它时,它会在图像下方添加标题内容。

 <a class="fancybox" rel="gallery2" href="img/img.jpg"  title="type here the text that should be under the image">
                    <img src="img/LogosC_11.png" />
 </a>

有没有办法设置标题的一部分可以点击?

attach 是我需要的一个例子。

在此处输入图像描述

4

1 回答 1

0

我通过将标题添加到<a>in jquery 来使其工作。

http://jsfiddle.net/cWNw9/822/

$('a').attr('title','<a href="/">go home fancybox</a>, you\'re drunk.');

而不是将标题写入 html 本身。

于 2013-06-21T21:09:36.160 回答