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

155
Views
How to set the time of the loader?

how can i set the time of the loader in this scenario? it works perfectly fine but it was so quick and i tried the inspect element and Network then disable cache and the fast 3G option i just wanna ask if how to set it in like 5 seconds timer

js

window.addEventListener("load",function () {
    const loader = document.querySelector(".loader");
    loader.className += " hidden"; // class hidden loader
});

html

<div class="loader">
  <img src="img/Preloader.gif" alt="loading.."/>
</div>
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

replace your javascript with this

setTimeout(function() { 
  const loader = document.querySelector(".loader");
  loader.hidden = true;
}, 5000);
about 4 years ago · Juan Pablo Isaza Report

0

replacing this javascript will do the trick

setTimeout(function() { 
  const loader = document.querySelector(".loader");
  loader.className += " hidden";
}, 5000);
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!