UNPKG

typewrite-simple

Version:
29 lines (26 loc) 722 B
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="X-UA-Compatible" content="ie=edge" /> <title>Example - deleteAll with custom speed</title> </head> <body> <div id="typewrite"></div> <script src="../../dist/index.umd.js"></script> <script type="text/javascript"> const instance = new Typewrite('#typewrite', { loop: true, delay: 0 }) instance .typeString('Hello world!') .pauseFor(1000) .deleteAll(15) .typeString('Another message here...') .pauseFor(1000) .start() </script> </body> </html>