How do I make text appear and then disappear again?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wewannaknow
    New Member
    • May 2010
    • 1

    #1

    How do I make text appear and then disappear again?

    I want a script that "types" my text letter by letter and also deletes the text letter by letter.
    I want it to look as if someone is typing the text live, and then when it deletes (letter by letter), it would start from the beginning, erasing the letters in the same pace new letters are being "typed".
    So this way you would never see the whole text, but only a bit of it at a time.
    By the time you would get to the end of the text, the beginning wouldn't be there.
    And I don't want the text in a box!

    I would be very grateful for any help!
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    You would need setInterval for the timing aspect. To make changes to an element, you can grab the element with document.getEle mentById and then set its innerHTML property. There are other "more standard" ways, so to speak, but this is an easy, well supported way to set the text.

    Post what you've managed so far.

    Comment

    Working...