【发布时间】:2013-09-25 19:42:10
【问题描述】:
这段代码就像是基于 Apache 的服务器上的冠军。
<script type="text/javascript">
jQuery(document).ready(function(){
if (document.cookie.indexOf('visited=true') == -1) {
var fifteenDays = 1000*30;
var expires = new Date((new Date()).valueOf() + fifteenDays);
document.cookie = "visited=true;expires=" + expires.toUTCString();
$.colorbox({inline:true, href:"#subscribe"});
}
});
</script>
<style type="text/css">
.bssubpop { display:none; }
</style>
<p><a class='bssubpop' href="#">Subscription box</a></p>
<!-- This contains the hidden content for inline calls -->
<div style='display:none'>
<div id='subscribe' title='sub'>
<a href="/newsletter-sign-up.html"><img src="https://www.stogieboys.com/images/bspop.jpg" width="600" height="600" /></a>
</div>
</div>
但是当我将它移动到基于 nginx 而不是 apache 的“实时”服务器时,我会永远得到一个 loading.gif,它永远不会加载图像。
我知道我是使用 nginx 服务器的新手,但我开始把剩下的头发拉出来。
任何和所有的帮助都会很棒。
仅供参考,是的,我知道 var FifthDays 不等于它,但一旦它起作用就会。我通过在浏览器中输入检查了图像位置,它是正确的,所以它不是。
【问题讨论】:
标签: javascript jquery apache nginx colorbox