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

126
Views
Detect that Bootstrap carousel ended

I would like to know if there is any way to detect when the Bootstrap carousel finishes running, since I need to execute a function when the carousel reached the last element.

I apply here the question to a comment to see it in a better format:

const carousel = document.getElementById("carouselContainer");

carousel.addEventListener("slid.bs.carousel", function (e) {
    if (e.direction === "right" && e.to === elements.length - 1) {
      // Take an action
    }
  });

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

0

Yes, check documentation: you should compare from and to according to direction.


if (direction == 'left' && to == 0) {
    startReached();
}

if (direction == 'right' && to == elements.length - 1) {
    endReached();
}
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!