adding cursor to css on click
css animation for blinking cursor
clarified behavior for startIndex not defined inside moveCursor function