Skip navigation
cherishrose12344321
Currently Being Moderated

Endless code

Jun 25, 2012 7:16 AM

How do i make this vertical scrolling images endless so there is never a brake bewteen the pictures

Thank you

 

 

<div id="datacontainer" style="position:absolute;right:1px;top:10px;width:15%" onMouseover="scrollspeed=0" onMouseout="scrollspeed=cache">

<!-- ADD YOUR SCROLLER CONTENT INSIDE HERE -->

<ul id="scroller">
<li><img src="pool.jpg" width="250" height="170"></li> <br>
<li><img src="barn.jpg" width="250" height="170"></li> </br>
<li><img src="lightuphouse.jpg" width="250" height="170"></li> <br>
<li><img src="housenotlitup.jpg" width="250" height="170"></li> </br>
<li><img src="shapedbuilding.jpg" width="250" height="170"></li><br>
<li><img src="outsidebarn.jpg" width="250" height="170"></li></br>
<li><img src="nicenewhouse.jpg" width="250" height="170"></li><br>
<li><img src="insideofdinningroom.jpg" width="250" height="170"></li></br>
    <li><img src="buildinginside.jpg" width="250" height="170"></li><br>
</ul>
 

<!-- END SCROLLER CONTENT -->

</div>

<script type="text/javascript">

/***********************************************
* IFRAME Scroller script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

//Specify speed of scroll. Larger=faster (ie: 5)
var scrollspeed=cache=1

//Specify intial delay before scroller starts scrolling (in miliseconds):
var initialdelay=0

function initializeScroller(){
dataobj=document.all? document.all.datacontainer : document.getElementById("datacontainer")
dataobj.style.top="5px"
setTimeout("getdataheight()", initialdelay)
}

function getdataheight(){
thelength=dataobj.offsetHeight
if (thelength==0)
setTimeout("getdataheight()",1)
else
scrollDiv()
}

function scrollDiv(){
dataobj.style.top=parseInt(dataobj.style.top)-scrollspeed+"px"
if (parseInt(dataobj.style.top)<thelength*(-1))
dataobj.style.top="5px"
setTimeout("scrollDiv()",60)
}

if (window.addEventListener)
window.addEventListener("load", initializeScroller, false)
else if (window.attachEvent)
window.attachEvent("onload", initializeScroller)
else
window.onload=initializeScroller

</script>

</body>
</body><!-- 1340371572 -->

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points