1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Delay in opening shadowbox.js?

Discussion in 'JavaScript' started by Rodder7, Nov 8, 2010.

  1. #1
    The site is http://rodallen.org..I am trying to delay shadowbox from opening for 8 seconds...any help is always appreciated...
     
    Rodder7, Nov 8, 2010 IP
  2. wing

    wing Active Member

    Messages:
    210
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    58
    #2
    This should do it
    <script type="text/javascript">
    function showBox() {
    	Shadowbox.init();
    	if ($.cookie('guest') != '1') {
    		Shadowbox.open({content:'<iframe style="background-color:#ffffff;" src="http://abcomputered.com/popup/index.html" height="515" width="550" frameborder="no" scrollbars="0" scrolling="no"></iframe>',player:"html",height:513,width:550});
    		$.cookie('guest','1',  {expires: '1',domain: 'rodallen.org'});
    	};
    }
    
    $(document).ready(function(){
    	setTimeout("showBox()", 8000); // delay 8 sec
    	$("#slider").easySlider({
    		auto: true,
    		continuous: true,
    		nextId: "slider1next",
    		prevId: "slider1prev"
    	});
    	$("#slider2").easySlider({
    		numeric: true
    	});
    });
    </script>
    Code (markup):
    :)
     
    wing, Nov 8, 2010 IP
  3. Rodder7

    Rodder7 Active Member

    Messages:
    451
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    88
    #3
    REP! Dude, you so rock!!!
     
    Rodder7, Nov 8, 2010 IP
  4. Rodder7

    Rodder7 Active Member

    Messages:
    451
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    88
    #4
    The only problem is the cookie to have it display only once is not working. It pops up everytime the page is loaded.
     
    Rodder7, Nov 8, 2010 IP
  5. Rodder7

    Rodder7 Active Member

    Messages:
    451
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    88
    #5
    found the problem. thanks again.
     
    Rodder7, Nov 9, 2010 IP