Js Typewriter
Standard JS.
by Kev
HTML
<div id="container">
</div>
CSS
#container {
height:24px;
line-height:32px;
width:100%;
background:pink;
}
JavaScript
var userName = prompt(),
quote = "All work and no play makes " + userName + " a dull boy",
lineCount = 0,
charPos = 0;
charInput = 'arse',
// lineHeight = document.getElementById('container').style.getPropertyValue("line-height");
container = document.getElementById('container'),
lineHei = lineH.style.lineHeight;
document.getElementById('container').innerHTML = quote;
alert('hey' + lineCount);
alert(lineHei);
var doSomeShit = function() {
alert('Doing some shit...' + charInput + " " + lineHei);
document.getElementById('container').style.height += 32';
alert(line);
}
var e = 13 // ENTER key
document.onkeyup = doSomeShit;