louieaw Posted October 12, 2007 Share Posted October 12, 2007 I need my scroller to pause every time a certain link reaches the top of the scroller for just a few seconds. I made it so it pause on mouseover. I have a couple of ideas, but they dont work.I'm counting on somebody to be able to maybe wrie something that will help me.So far... <style type="text/css">#marqueecontainer{position: relative;width: 800px; height: 200px; background-color: lightblue;overflow: hidden;border: 3px solid blue;padding: 2px;padding-left: 4px;}body{background-color:lightblue;font-size:20;}a{color:red;text-decoration:none}a:hover{color:blue;text-decoration:underline;}</style><script type="text/javascript">var delayb4scroll=3000 var marqueespeed=1var pauseit=1 var copyspeed=marqueespeedvar pausespeed=(pauseit==0)? copyspeed: 0var actualheight=''function scrollmarquee(){if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8)) cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px" else //else, reset to original positioncross_marquee.style.top=parseInt(marqueeheight)+8+"px"}function initializemarquee(){cross_marquee=document.getElementById("vmarquee")cross_marquee.style.top=0marqueeheight=document.getElementById("marqueecontainer").offsetHeightactualheight=cross_marquee.offsetHeight if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ cross_marquee.style.height=marqueeheight+"px"cross_marquee.style.overflow="scroll"return}setTimeout('lefttime=setInterval("scrollmarquee()",30)', delayb4scroll)}if (window.addEventListener)window.addEventListener("load", initializemarquee, false)else if (window.attachEvent)window.attachEvent("onload", initializemarquee)else if (document.getElementById)window.onload=initializemarquee</script><center> <div id="marqueecontainer" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"><div id="vmarquee" style="position: absolute; width: 98%;"></center><!--Here--><center>This is a test for the scroller<br><br><br><br><a href="http://www.w3schools.com">Link1 </a><br><br><br><br><a href="http://www.w3schools.com">Link2</a><br><br><br><br><a href="http://www.w3schools.com">Link3 </a><br><br><br><br><a href="http://www.w3schools.com">Link4 </a><br><br><br><br><a href="http://www.w3schools.com">Link5 </a><br><br><br><br><a href="http://www.w3schools.com">Link6 </a><!--Through Here--></div></div> Thank you very very much! Link to comment Share on other sites More sharing options...
jlhaslip Posted October 13, 2007 Share Posted October 13, 2007 Might want to ask in the javascript Forum... Link to comment Share on other sites More sharing options...
justsomeguy Posted October 15, 2007 Share Posted October 15, 2007 Rather then having it stop when a certain piece of content is in a certain place, have it scroll for a set distance then stop. So it scrolls for 50px, pauses, scrolls another 50px, pauses, etc. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.