Timeline for TypeWriter Javascript effect
Current License: CC BY-SA 4.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 10, 2020 at 13:24 | history | edited | Community Bot |
Commonmark migration
|
|
Nov 29, 2018 at 11:33 | vote | accept | Ains Clark | ||
Aug 21, 2018 at 14:21 | comment | added | Blindman67 |
@AinsClark Code review is not really a place to ask "How do I?" Go to stackoverflow for code problems. Anyways i have added backspace , it deletes characters for every < character it finds. See updated code snippet.
|
|
Aug 21, 2018 at 14:18 | history | edited | Blindman67 | CC BY-SA 4.0 |
added 212 characters in body
|
Aug 21, 2018 at 13:54 | comment | added | Ains Clark | Thanks @Blindman67. Is there also an easy way to implement a delete function? Its the main problem I encountered when writing the original code. I've been trying and no luck (with the above code). | |
Aug 19, 2018 at 13:18 | comment | added | Blindman67 |
@AinsClark to stop at the end. Change from the line that sets 'charPos' change const to a var as var charPos = (time - startTime) / speed | 0; then check its length charPos = Math.min(charPos, words.length - 1) to prevent typing past the end and to stop the animation dont call requestAnimationFrame when at end if(charPos < words.length -1) { requestAnimationFrame(typer) }
|
|
Aug 19, 2018 at 12:46 | comment | added | Ains Clark | Wow thank you for your detailed answer. I had no idea that requestAnimationFrame existed. I will further look into it. With the code given. Would there be a way to implement a delete function where it deletes text and 're types? Also, how would I stop the loop after one iteration. As in, so it doesn't loop infinitely? Thanks again. | |
Aug 19, 2018 at 10:02 | history | edited | Blindman67 | CC BY-SA 4.0 |
deleted 36 characters in body
|
Aug 18, 2018 at 19:54 | history | answered | Blindman67 | CC BY-SA 4.0 |