[英]Links inside a fancybox popup
I have an issue that I am lost on how to solve. 我有一个问题,我不知道该如何解决。 In my program, when a user clicks an image the fancybox script runs causing a new image to appear as a popup.
在我的程序中,当用户单击图像时,fancybox脚本将运行,导致新图像显示为弹出窗口。 However, in that image I would like to be able to place links as well.
但是,在该图像中,我也希望能够放置链接。 Basically I want to use link blocks of specific width and height and position within the popup image, creating a link within a link.
基本上,我想在弹出图像中使用特定宽度,高度和位置的链接块,从而在链接中创建链接。 Is that even possible to do?
那有可能做到吗?
Here is some code: 这是一些代码:
<!--Using the fancybox functions -->
<script type="text/javascript">
$(document).ready(function(){
$("#contentArea a").fancybox({
'overlayShow' : false,
'transitionIn' : 'elastic',
'transitionOut' : 'elastic'
});
});
</script>
Here is the HTML: 这是HTML:
<div id="contentArea" role="main">
<a href="../images/IRPA_two-navigation-books.png" title="Raj Sharma" style="width: 217px;height: 117px;position: absolute;display: block;top: 340px;left: 450px; background-image:url(../images/transparent.png)"></a>
</div>
As you can see I created a fancybox image popup for a block link in a specific position. 如您所见,我为特定位置的块链接创建了fancybox图像弹出窗口。 How do I create links with specified width/height and position within the popup fancy box image?
如何在弹出式花式框图像中创建具有指定宽度/高度和位置的链接?
This is the tool/library that I am using, in-case anyone is confused: http://fancybox.net/ 如果有人感到困惑,这是我正在使用的工具/库: http : //fancybox.net/
Thanks! 谢谢!
You can do this easily: 您可以轻松地做到这一点:
var html = "<!--- some html here to add to the fancybox -->";
$('#fancybox-title-over').html(html);
$('#fancybox-title-over').css('background-color' , 'transparent');
It will appear in the overlay title as seen in the sixth example on http://fancybox.net/ 它将出现在叠加标题中,如在http://fancybox.net/上的第六个示例中所示。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.