我有iframe中的下一个代码,我实现它获取显示在父,但现在我不知道我可以如何组合图像画廊在fancybox示例中的图像。Fancybox图片库
我在例子中看到这一点:
$(document).ready(function() {
$('.imagen').click(function(e){
e.preventDefault();
parent.$.fancybox([
{href:'images/01.jpg', title: '01'},
{href:'images/02.jpg', title: '02'},
{href:'images/03.jpg', title: '03'}
],{
// href: this.href,
helpers: {
overlay: {...............
,但我不希望因为链接将是动态的。我想使用类似 $(".fancybox") .attr('rel', 'gallery')
和使用它像
<a class="fancybox" rel="gallery" href="Lector.ashx?ImagenId=0" >
实现看到与下一个按钮作为图像库的img,但我不我有什么修改。
我的代码:
<script type="text/javascript">
$(document).ready(function() {
$('.fancybox').click(function (e) {
e.preventDefault();
parent.$.fancybox({
href: this.href,
helpers: {
title: { type: 'inside' },
overlay: {
opacity: 0.3
} // overlay
//, buttons: {}
} // helpers
}); // fancybox
}); // click
});
</script>
体
<a class="fancybox" href="Lector.ashx?ImagenId=14" >
<img alt="" src="../Resources/background.png" width="100" height="100"/>
</a>
<a class="fancybox" href="Lector.ashx?ImagenId=6">
<img alt="" src="Lector.ashx?ImagenId=6" width="100" height="100"/>
</a>
<a class="fancybox" href="Lector.ashx?ImagenId=20">
<img alt="" src="Lector.ashx?ImagenId=6" width="100" height="100"/>
</a>
我使用的fancybox 2.1.3请帮我!!!! 在此先感谢
I have to do this?
$(document).ready(function() {
$('.fancybox').click(function (e) {
like i said before at start???
});//click
$('.fancybox').attr('rel', 'gallery').fancybox({
JFK code??
});
});//
您是否查看Fancy Box文档以获取帮助? –
yesh我看到这个Open something,但它不适用于ashx – Urah