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

108
Views
Smooth animation on pure js css for a training site

please tell me, otherwise I forgot. How can I make a smooth slide transition animation? Here is js and css code i know teg anitame, transform, is not work this shelter for pets site, and sencion for html, css, js slider enter image description here

let slideIndex = 1;
showSlides(slideIndex);

let prev = document.getElementById("prev");
let next = document.getElementById("next");

next.addEventListener("click", function () {
  showSlides((slideIndex += 1));
  makeTimer(); 
});

prev.addEventListener("click", function () {
  showSlides((slideIndex -= 1));
  makeTimer(); 
});

function currentSlide(n) {
  showSlides((slideIndex = n));
}

function showSlides(n) {
  let slides = document.getElementsByClassName("myslide");
  if (n > slides.length) {
    slideIndex = 1;
  }
  if (n < 1) {
    slideIndex = slides.length;
  }

  for (let slide of slides) {
    slide.style.display = "none";
  }
  slides[slideIndex - 1].style.display = "flex";

}
let timer = 0;
makeTimer(); // интервал
function makeTimer() {
  clearInterval(timer);
  timer = setInterval(function () {
    slideIndex++;
    showSlides(slideIndex);
  }, 10000);
}
about 4 years ago · Juan Pablo Isaza
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!