From 4ee1fce992d2149aed323507cb83ef31a20a6bfb Mon Sep 17 00:00:00 2001 From: Arsia Ghahari Date: Mon, 21 Aug 2017 22:49:56 -0700 Subject: [PATCH] Fixed the bugs and changed the cursor color and width --- index.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index b3625db..e22167b 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ #magic{ color: #777; - border-right: 1px solid #777; + border-right: 2px solid white; padding-right: 7px; display: inline; } @@ -29,12 +29,13 @@ el = document.getElementById('magic'), word_counter = 0, character_counter = 0; - + function updateText() { - el.innerHTML = el.innerHTML+words[word_counter][character_counter++]; + + el.innerHTML = (el.innerHTML+words[word_counter][character_counter++]).replace(" "," "); - if(character_counter == words[word_counter].length) + if(character_counter == words[word_counter].length+1) { word_counter++; //choose a different word character_counter = 0; //start over with the first character of the word