Skip to main content

I want to show the lightbox on only homepage of my blog.but somethings wrong



I have this code:







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







The code is for a Facebook-like box which appears when a user visits my blog. My blog is on blogger. My problem is that the lightbox of this jquery appears again and again whenever a user sees other posts or refreshes the page. I want it to appear only on the home page of site. I don't know anything about jQuery.


Comments

  1. Likely its all the &quot;. Change all of them to ". Change &39; to ' as well

    ReplyDelete

Post a Comment

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?