Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

307
Views
is there anyway to know Typed JS effect is complete?

Hi I am creating a typewriting effect Using Type Js Library and I want to know is there any way I can know the Typed JS effect is completed?

Any kind of help is highly appreciated :)

var typed = new Typed('.typed', {
    stringsElement: '.typed-strings',
  loop:false
  });
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="wclassth=device-wclassth, initial-scale=1.0">

 <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
  <script src="https://cdn.jsdelivr.net/npm/typed.js@2.0.12"></script>

  <title>Document</title>

</head>

<body>

  
   <div class="typed-strings">
    <p>Typed.js is a <strong>JavaScript</strong> library.</p>
    <p>It <em>types</em> out sentences.</p>
  </div>
  
  <span class="typed"></span>

</body>

</html>

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

A quick glance at the library's documentation shows that there is an onComplete parameter that takes a function: docs link

In the onComplete you can set a variable to mark the animation as completed.

let isEffectComplete = false;
const typed = new Typed('.typed', {
  stringsElement: '.typed-strings',
  loop:false,
  onComplete: () => { isEffectComplete = true },
});
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!