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

179
Vistas
Can the bootstrap accordion control a DIV?

I am wondering if the bootstrap accordion can control a DIV without javascript. I want to achieve this effect: https://testbuttons.bss.design/accordion.html but now I am using:

$('#btn_lesson-1').click(function(){
    $('#lesson-1').show();
    $('#lesson-2').hide();
    $('#lesson-3').hide();
});

$('#btn_lesson-2').click(function(){
    $('#lesson-2').show();
    $('#lesson-1').hide();
    $('#lesson-3').hide();
});

    
$('#btn_lesson-3').click(function(){
    $('#lesson-3').show();
    $('#lesson-1').hide();
    $('#lesson-2').hide();
    
});

But it gets annoying to create code for more lessons.

Or maybe there is some other way to achieve thisņ Maybe some simple CMS?

Thanks!!!!!

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

If you are using bootstrap, the accordion should already be opening and closing elements by default based on the clicked element. See this example: https://getbootstrap.com/docs/4.0/components/collapse/#accordion-example

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