Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7884783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:53:41+00:00 2026-06-03T04:53:41+00:00

I have seen numerous questions generally touching this subject, I know exactly what needs

  • 0

I have seen numerous questions generally touching this subject, I know exactly what needs to be done but I’m not “fluent” with jQuery therefore, I cannot successfully do this.

 <ul class="nav nav-pills" id="activate">
    <li><a href="#tab1" data-toggle="tab">Tab 1</a></li>
    <li class="active"><a href="#tab2" data-toggle="tab">Tab 2</a></li>
 </ul>

 <div class="tab-content">
     <div id="tab1"><h1>Data for Tab 1</h2></div>
     <div id="tab2">
         <a href="#tab1" rel="taburl" data-toggle="tab">Take me to tab content #1</a>
     </div>

Ideally, the data of that tab is switched to #tab1, however, the tab will not switch to active class on the href="#tab1" (stays active on #tab2 but displays the data from #tab1)

I figured I could use the .first() method and target the first occurrence of href="#tab1 and .addClass('active') to this li. But I do not know how to select the li for anylink I link to it to directly target that href ID

I really do not know if this can be done. Can I inject the href data from the link (with jQuery) then add it to the tab link and make it active.

And again, the data-toggle="tab" switches to the right content but will not update the active tab on the navbar,

so is there a way to select that exact ‘tab’ and .addClass('active') to the <li> once I’ve fired the link.

Thank you for your time.

JSFIDDLE EXAMPLE

http://jsfiddle.net/epiceon/M6NQJ/1/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:53:42+00:00Added an answer on June 3, 2026 at 4:53 am

    If you switch between tabs like that you’re going to need to call tab('show') again on the tab you intend that button to go to.

    On a side note, you should consider updating your version to 2.0.3 if you’re using tabs. They fixed a few bugs (mostly with tabs on the left or right) but even dropping in the new navs.less file might save you a headache down the road.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok, I've seen numerous variations on this question, but none exactly answer what I'm
I have reviewed numerous reports of this error but the solutions I have seen
I have seen numerous posts on this and numerous answers, but I can't quite
I have seen numerous questions on MVP that mostly revolve around the View and
I have seen numerous ways to highlight the current tab, but they all have
I have seen this thread ClassNotFoundException Thrown using MapView but no help for me.
I've seen this question asked numerous times and have gone over my code over
I have seen numerous posts about the IE Webpage has expired error message, but
I have seen numerous examples of the Command pattern But they all tend to
Have seen some similar questions: What is the difference between a JavaBean and a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.