Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/88.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 我如何在博客的主页上显示灯箱?_Javascript_Jquery_Html_Css_Lightbox - Fatal编程技术网

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

Javascript 我如何在博客的主页上显示灯箱?,javascript,jquery,html,css,lightbox,Javascript,Jquery,Html,Css,Lightbox,我有以下代码: <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.goo

我有以下代码:

<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>

jQuery(文档).ready(函数(){
if(document.cookie.indexOf(';visted=flase';)=-1){
变量五天=1000*60*60*24*30;
var expires=新日期((新日期()).valueOf()+五个星期);
document.cookie=“visited=false;expires=“+expires.toutString();
$.colorbox({宽度:“400px”,内联:true,href:#mdfb“});
}
});

该代码用于一个类似Facebook的框,当用户访问我的博客时会出现该框。我的博客在blogger上。我的问题是,每当用户看到其他帖子或刷新页面时,这个jquery的lightbox就会反复出现。我希望它只出现在网站的主页上。我对jQuery一无所知。

可能是所有的
。将它们全部更改为
。更改
&39
以及
'文字-将其更改为
我尝试过,但没有成功。当我移动到下一页时,我可以再次看到灯箱。是否将其包含在模板中?是的。在我的博客模板中。我只希望当用户访问网站主页时,该灯箱只出现一次。但是它出现在每个页面上。你应该把它发布在你的主页上,而不是模板上。在这里帮助我们。。。您需要更具描述性,并提供一些特定的信息:例如:当您说“此jquery一次又一次地出现”时,您是指出现了特定的代码,还是说您看到了多个lightbox?代码在哪里?它是否在所有页面的模板中?如果是这样,这就是为什么它出现在所有页面上,而不仅仅是主页上。