Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

125
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda