简体   繁体   English

Fancybox在页面加载时打开

[英]Fancybox Open on Page Load

I open fancy box on page load. 我在页面加载时打开了花式框。 The fancybox loading fine but the external link doesn't open when I click on fancybox. fancybox可以很好地加载,但是当我单击fancybox时,外部链接无法打开。

This is the div I use for fancybox 这是我用于fancybox的div

<div id="inline2" style="display:none;">
<a href="download.php" target="_blank"><img src="images/upgrade.png" border="0" /></a>
</div> <!-- end of inline2 -->

I use this code I use in the page head section 我使用在页眉部分使用的这段代码

<script type="text/javascript">     
$(document).ready(function() {
$("#inline2").fancybox({ 
'padding':          0,
'cyclic':       true,
'width':        625,
'height':       350,
'padding':      0, 
'margin':      0, 
'speedIn':      300,
'speedOut':     300,
'transitionIn': 'elastic',
'transitionOut': 'elastic',
'easingIn':     'swing',
'easingOut':    'swing',
'titleShow' : false
}); 
$("#inline2").trigger('click');
});
</script>

Could somebody please help me how to open the donwnload.php page when I click on fancybox? 当我点击fancybox时,有人可以帮助我如何打开donwnload.php页面吗?

Thank you! 谢谢!

Try this script... 试试这个脚本...

$("#inline2").fancybox({ 
'padding':          0,
'cyclic':       true,
'width':        625,
'height':       350,
'padding':      0, 
'margin':      0, 
'speedIn':      300,
'speedOut':     300,
'transitionIn': 'elastic',
'transitionOut': 'elastic',
'easingIn':     'swing',
'easingOut':    'swing',
'titleShow' : false
}).trigger('click');

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM