Typed.js Speed Lagging

697 Views Asked by At

I'm using Typed.js and all is working as expected. However occasionally the typing speed will be far slower than expected. This is an issue for me because I am using a timeOut function to do something after the text has typed out.

Sometimes the typing speed is completely normal and sometimes it only types one letter a second, aka huge delay. How can I fix this?

Note: I have multiple Typed objects on the page. Here is one:

var typed = new Typed('#typed-free', {
  stringsElement: '#typed-explain-free',
  backSpeed: 0,
  typeSpeed: 55,
  showCursor: false,
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/typed.js/2.0.0/typed.min.js" integrity="sha512-zKaK6G2LZC5YZTX0vKmD7xOwd1zrEEMal4zlTf5Ved/A1RrnW+qt8pWDfo7oz+xeChECS/P9dv6EDwwPwelFfQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<div id="typed-free"></div>
<div id='typingExplanation'>
  <div id="typed-explain-free">
    <p>Welcome this is an example of using Typed where it is lagging too much. </p>
  </div>
</div>

0

There are 0 best solutions below