我正在创建一个小小的JavaScript游戏。当页面加载时,它应该在页面上显示一个Fancybox。FancyBox onload show无法正常点击
这里是我的jQuery的的fancybox:
$(document).ready(function() {
$('#test').fancybox({
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'showCloseButton' : false,
'overlayOpacity' : 1
}).click();
});
这里是我的HTML:
<a id="test" href="#test2" style="display:none;">Test the Popup</a>
<div style="display:none;">
<div id="test2" style='padding:10px; background:#fff;width:550px;'>
<b style="color:#FF9C21;font-size:24px;">HTML Jeoprady</b><br>
<span style="font-size:15px;">
You think your good at HTML? Well test your skill here.<br>
Please know there is more to HTML than 2 tags ;)<br>
Are you ready?<br><br>
<b style="color:#FF9C21;font-size:24px;">Name:</b>
<input type="text" id="team1" />
</span>
<br><br>
<span id="start" onclick="loop();" style="cursor:pointer;color:#FF9C21;font-size:20px;">
<center>Start Game!</center></span>
</div>
</div>
我所有的FancyBoxes激活的onclick秀,但随后后自动关闭约5秒钟打开。
有没有办法解决这个问题?
请更新您的文章,以显示被点击的元素html。 Ala,HREF。 –