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

238
Visualizações
How to navigate to specific tab of bootstrap 5 from external link

I want to redirect a user to a specific tab after clicking the link of another page. Here is the code of page 1: index.html

<div class="products-btn">
    <a href="products.html#pills-profile">view all</a>
</div>

Page 2 Products.html:

<ul class="nav nav-pills justify-content-center" id="pills-tab" role="tablist">
    <li class="nav-item" role="presentation">
        <button class="nav-link active" id="pills-home-tab" data-bs-toggle="pill" data-bs- 
         target="#pills-home" type="button" role="tab" aria-controls="pills-home" aria- 
         selected="true">products</button>
    </li>
    <li class="nav-item" role="presentation">
         <button class="nav-link" id="solve" data-bs-toggle="pill" data-bs-target="#pills- 
          profile" type="button" role="tab" aria-controls="pills-profile" aria- 
          selected="false">solutions</button>
    </li>
</ul>

I want to redirect the user from product's btn to solutions tab. I'm using bootstrap 5.1 in my all pages.

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

0

Just put an id of your tab in your link after "#" <a href="products.html#solve">view all</a>

about 4 years ago · Juan Pablo Isaza Relatório

0

If you want to move from product.html to solution.html onclick you can use the href:

<a href="solution.html">solution</a>
about 4 years ago · Juan Pablo Isaza Relatório

0

check the root folder and write the full path from your index.html to products.html

then add this

<a href="{your path to the page}/products.html#pills-tab">products</a>

example:
I have the index and folder named folder1 inside this folder, there's another folder named folder2 that contains the products page:

<a href="folder1/folder2/products.html">products</a>

another example:
I want to go back to index.html:

<a href="../../index.html">products</a>

../ means go bach to previous/parent folder


anchor mozilla

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