如何在我的博客博客的主页上显示灯箱?

问题描述:

我有这样的代码:如何在我的博客博客的主页上显示灯箱?

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js'/> 

    <script src='https://gj37765.googlecode.com/svn/trunk/html/[www.gj37765.blogspot.com]jquery.colorbox-min.js'/> 
<link href='https://gj37765.googlecode.com/svn/trunk/html/%5Bwww.gj37765.blogspot.com%5Dfbpopup.css' rel='stylesheet' type='text/css'/> 
<script type='text/javascript'> 
    jQuery(document).ready(function(){ 
     if (document.cookie.indexOf(&#39;visited=flase&#39;) == -1) { 
      var fifteenDays = 1000*60*60*24*30; 
      var expires = new Date((new Date()).valueOf() + fifteenDays); 
      document.cookie = &quot;visited=false;expires=&quot; + expires.toUTCString(); 
     $.colorbox({width:&quot;400px&quot;, inline:true, href:&quot;#mdfb&quot;}); 
      } 
    }); 
    </script> 

的代码是当用户访问我的博客出现一个类似Facebook的框。我的博客是在博客上。我的问题是,当用户看到其他帖子或刷新页面时,此jQuery的灯箱会一次又一次出现。我希望它只出现在网站的主页上。我对jQuery一无所知。

+0

帮助我们在这里...你需要更具描述性,并提供一些具体信息: 例如:当你说“这个jquery一再出现”,你的意思是特定的代码是出现,还是你看到多个灯箱? 这个代码在哪里?它是否在所有页面的模板中?如果是这样,那就是它出现在所有页面上的原因,而不仅仅是主页。 – lhagemann 2012-01-16 14:54:36

其可能全部为&quot;。将其全部更改为"。更改&39;'以及

+0

和'''字面 - 将其改为'' – 2012-01-16 14:45:15

+0

我试过了,但它没有奏效。当我移动到下一页时,我可以再次看到灯箱。 – 2012-01-16 14:56:15

+0

你是否将它包含在模板中? – 2012-01-16 14:58:31