Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

570
Visualizações
How do you make a link_to text clickable to activate a Boostrap collapsible?

I have this code for a collapsible header text and a caret besides it which collapses/uncollapses a div .

<span><strong>"Weekly"</strong></span> <a class="caret" type="button" data-toggle="collapse" data-target="#weekly" aria-expanded="false" aria-controls="weekly"></a>

<div class="collapse overflow-hidden" id="weekly">
  # Collapsible content
</div>

I want to make the header text next to the caret clickable too, to give the user a larger area to click on that will collapse/uncollapse the corresponding div.

I've tried wrapping the span and a tags inside a link_to with unsatisfying results (the text links to the anchor that represents the id of the div to be uncollapsed).

What would be the correct way to accomplish this?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can make it clickable if you put everything in a button in the top container.

Example :

<a class="caret" type="button" data-toggle="collapse" data-target="#weekly" aria-expanded="false" aria-controls="weekly">
    <span><strong>"Weekly"</strong></span> 
</a>
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda