Results 1 to 2 of 2

Thread: Headline rotation

  1. #1
    Join Date
    Feb 2009

    Headline rotation

    Hey, I have this code for my site, www.TBDGaming.com and I'm rather new to javascript, I was just wondering if someone could clear up one issue I'm having:

    I would like the headline pictures to alternate between each other. I've experimented a little wit the setTimeout variable but nothing so fa has worked, mainly because I don't fully understand how it works I believe :/. Anyway, what I would basically like to happen is I would like the pictures to change between one another infinitely. The code for the static page is below, so the code needs to be for a static page (no <head>, <body>, etc.)

    		<!-- starting headlines -->
    			<div class="headlineWrap" id="headlineWrap">
    				<!-- headline 1 -->
    				<div id="headline1">
    					<a href=""><img src="http://i39.tinypic.com/2zycr3n.gif" alt="" /></a>
    					<div class="headlineContent">
    						<div class="headlineTxt">To Be Determined - Coming Soon</div>
    						<div class="headlineSwitch">
    							<a href="javascript:setImg(0)" onclick="switchHeadline('headline1');"><img src="images/icons/1on.gif" alt="" /></a>
    							<a href="javascript:setImg(1)" onclick="switchHeadline('headline2');"><img src="images/icons/2.gif" alt="" /></a>
    							<a href="javascript:setImg(2)" onclick="switchHeadline('headline3');"><img src="images/icons/3.gif" alt="" /></a>
    							<a href="javascript:setImg(3)" onclick="switchHeadline('headline4');"><img src="images/icons/4.gif" alt="" /></a>
    							<a href="javascript:setImg(4)" onclick="switchHeadline('headline5');"><img src="images/icons/5.gif" alt="" /></a>
    Thanks in advance!

  2. #2
    Join Date
    Apr 2003
    At least 98% of internet users' DNA is identical to that of chimpanzees

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center