将标题转换为链接在 Lightbox 2.51 中不起作用 [英] turning caption into a link doesn't work in Lightbox 2.51
本文介绍了将标题转换为链接在 Lightbox 2.51 中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在从此处
下载的 Lightbox 2.51 中无法将标题转换为链接代码如下:
Turning a caption into a link doesn't work in Lightbox 2.51 downloaded from here
Here is the code:
<a href="images/examples/image-1.jpg" rel="lightbox"
title="<a target='_self' href='http://www.google.com'>Google</a>">
<img src="images/examples/thumb-1.jpg" alt="" />
</a>
我该怎么办?
谢谢:)
What should I do?
Thanks :)
推荐答案
我在 lightbox.js
中找到了解决这个问题的方法.您必须编辑 if
案例,添加 else
条件,以避免在 div
中单击时总是返回 false
灯箱".
I found a solution for this problem in the lightbox.js
.
You must edit the if
case, adding the else
condition that avoid always return false
when you click in the div
"lightbox" .
$lightbox.hide().on('click', function(e) {
if ($(e.target).attr('id') === 'lightbox') {
_this.end();
return false;
}
else { // HERE
return true;
}
});
这篇关于将标题转换为链接在 Lightbox 2.51 中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文