Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

228
Views
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 answers
Answer question

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 Report

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!