0
嗨,所以當有人訪問我的網站我想出現面板的消息「點擊[像按鈕]進入或等待20秒」,當訪客點擊像按鈕或20秒消失了,facebox消失了。關閉按鈕並在關閉方框外點擊應該被移除。這是我的嘗試。關閉Facebox事件
<script type="text/javascript">
var sec = 10
var timer = setInterval(function() {
$('#hideMsg span').text(sec--);
if (sec == -1) {
$('#hideMsg').fadeOut('fast');
clearInterval(timer);
}
}, 1000);
</script>
</head>
<body>
<div id="hideMsg" style="display:none;">
Click <iframe src="http://www.facebook.com/plugins/like.php?href=link&layout=standard&show_faces=false&width=450&action=like&font=trebuchet+ms&colorscheme=light&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe><br />
to enter or wait <span>10</span> Seconds!
</div>
<script type="text/javascript">
jQuery.facebox({ div: '#hideMsg' })
</script>