Like this:Someone else's getElementsByClassName function; I apologize, but I'm sure it's better than whatever I'd have written.Code:<script type="text/javascript">
function getElementsByClassName(oElm, strTagName, strClassName){
/*
Written by Jonathan Snook, http://www.snook.ca/jonathan
Add-ons by Robert Nyman, http://www.robertnyman.com
*/
var arrElements = (strTagName == "*" && document.all)? document.all : oElm.getElementsByTagName(strTagName);
var arrReturnElements = new Array();
strClassName = strClassName.replace(/\-/g, "\\-");
var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
var oElement;
for(var i=0; i<arrElements.length; i++){
oElement = arrElements[i];
if(oRegExp.test(oElement.className)){
arrReturnElements.push(oElement);
}
}
return (arrReturnElements)
}
var e = getElementsByClassName(document, "*", "typing");
for(var il = 0;il < e.length;il++) new TypingText(e[il]);
TypingText.runAll();
</script>
But nothing else.Quote:
Originally Posted by John
Starting can be done with the element.typingText.run() method. Stopping's a good idea. I'll add a .stop() method.Quote:
start them and stop them wherever you like
But you can't run them simultaneously. Personally, I'd rather have the special characters than have all that extra HTML just for a linebreak.Quote:
with whatever HTML you wish to use in between and/or around them without having to worry about any special characters.
Of course I do. I'm British. :p I used it here to illustrate the point that any character could be used.Quote:
Oh, and you have a '£' key on your keyboard? Figures. :)
