On 23 mar, 14:49, Randy Webb <HikksNotAtH... @aol.comwrote:
mistral said the following on 3/23/2007 8:37 AM:
Below is Typewriter Scroller script.
You mean something like this:
<URL:http://members.aol.com/_ht_a/hikksnotathome/typingText.html >
It is old (about 6/7 years) and could probably be written more efficiently.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptT oolbox.com/bestpractices/
-------------
No, I meant this: <URL: http://www.dhtmldev.co m/examples/js/typewriter_effe ct/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>Typewrit er Effect Example</title>
</head>
<body>
<h1>Typewrite r Effect Example</h1>
<p>View source to see the JavaScript.</p>
<script type="text/javascript">
function Typewriter(sNam e)
{ // PROPERTIES
this.counter = 0;
this.name = sName;
this.text = "";
this.speed = 50; // in milliseconds
// METHODS
this.addText = AddText;
this.next = Next;
this.setSpeed = SetSpeed;
this.write = Write;
// FUNCTIONS
function AddText(s)
{ this.text = s
}
function Next()
{ document.getEle mentById('typew riter_output'). innerHTML =
this.text.subst r(0, this.counter++) ;
}
function SetSpeed(iSpeed )
{ this.speed = iSpeed;
}
function Write()
{ setInterval(thi s.name+".next() ",this.spee d);
}
}
</script>
<div id="typewriter_ output" style="width:40 0px;border:1px black
solid;padding:1 em;background:# f3f3f3;"></div>
<script type="text/javascript">
var myTypewriter = new Typewriter("myT ypewriter");
myTypewriter.ad dText("Lorem ipsum dolor sit amet, consectetuer
adipiscing elit. Suspendisse eu nisi nec nunc tempor pharetra.
Phasellus sit amet lorem. Sed at lacus id augue rhoncus euismod.
Maecenas eleifend, dolor et facilisis accumsan, purus enim pulvinar
leo, non vehicula augue nulla posuere justo. Pellentesque est. Donec
dignissim. Sed semper. Donec turpis. Class aptent taciti sociosqu ad
litora torquent per conubia nostra, per inceptos hymenaeos. Morbi
viverra. Proin scelerisque.");
myTypewriter.wr ite();
</script>
</body>
</html>
Does someone know how to omit border & background color from div
container (style="visibil ity:hidden" ?), set font size/color/family,
plus show text repeatedly (loop)?
Regards.