»
EnglishFrenchVietnamese

Print - Dynamic Scroller - JavaScriptBank.com

Full version: jsB@nk » Browser » Page effect » Dynamic Scroller
URL: http://www.javascriptbank.com/dynamic-scroller.html

Dynamic Scroller © JavaScriptBank.comA DHTML Scroller. Nice for adds, news, or just to spice up your site. Works in Internet Explorer 5.+, Netscape 7.+, Mozilla 1.2+, Mozilla FireFox 0.8.

Full version: jsB@nk » Browser » Page effect » Dynamic Scroller
URL: http://www.javascriptbank.com/dynamic-scroller.html



CSS
<style type="text/css"><!--span.dynamic {  position:relative; height:100px; width:50%; }span#sid0 {  top:50;width:100%;z-index:1;background-color:#fff;}span#sid1 {  color:#00ff00;font-weight:bold;background-color:#000;z-index:0;}span#sid2, body.same{  top:-50;width:100%;z-index:1;background-color:#fff;}--></style><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<script language="JavaScript" type="text/javascript"><!--var message=new Array();message=["<br />Hello and Welcome to http://javascriptbank.com/<br />JavaScripts, DHTML Effects & Much More . . .","<br /><br />The Scripts are all FREE","<br />JavaScripts, Splash Intro Pages, Dynamic Scrollers, Menus, Text Effects, Games, and More . . .","<br /><br/><a href='http://javascriptbank.com/' style='color:white;text-decoration:none;'>Go to JSBank</a>"];var T=50; // - Timervar spans=new Array();var gcount=MsgCount=0;var tcount=50; // - Original Position from TOPvar bool=true;window.onload=Page_Load;function Page_Load(){   for(var x=0;x<3;x++)    spans[x]=document.getElementById('sid'+x); Dynamic_Scripts_Check_Browser(); Scripts_By_Richard_Hucko_Kaneohe_Hawaii();}function Dynamic_Scripts_Check_Browser(){  if(navigator.appName=="Netscape"){  document.getElementById('above').style.zIndex=0;document.getElementById('below').style.zIndex=0;  with(spans[1].style){  width=200;height=50;}}}function reposition(){if(tcount>-(0)&&MsgCount<message.length){  spans[1].innerHTML=message[MsgCount];  spans[0].style.top=tcount;spans[2].style.top=-(tcount);tcount-=1;}else if(bool){ T*=3+20; if(gcount<20) {   bool=false; } gcount++;}else if(MsgCount<message.length){  MsgCount++;tcount=50;bool=true;T=50;}setTimeout("reposition();",T);}function Scripts_By_Richard_Hucko_Kaneohe_Hawaii(){/*- Dynamic HTML Scroller II Created By RHUCKO1 */  spans[1].innerHTML=message[MsgCount];  reposition();}//--></script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<div style="text-align: center;"> <span id="sid0" class="dynamic" style="top: 21px;"></span><br> <span id="sid1" class="dynamic" style="width: 200px; height: 50px;"></span> <span id="sid2" class="dynamic" style="top: -21px;"></span></div><div id="below" style="position: relative; top: -100px; background-color: white; width: 100%; height: 150px; z-index: 0;"></div><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->