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

117
Vistas
Bootstrap Carousel Add Method next when visible

i have a carousel from bootstrap all setup - now i want it not to change when not visible, because i have different aspect ratio pictures in it so it messes with the body if its not visible. I tried the following code before my body tag:

<script>
    let myCarousel = document.querySelector('#carouselExampleFade')
    console.log(myCarousel)
    let carousel = bootstrap.Carousel.getInstance(myCarousel)
    console.log(carousel)
    carousel.nextWhenVisible()
    console.log("Next when visible")

</script>

the first log shows that js gets my carousel correctly. however, on the second log it says that its "null", and therefore cant apply nextwhenvisible. I use Bootstrap 5.

about 4 years ago · Juan Pablo Isaza
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