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 8965757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:52:46+00:00 2026-06-15T16:52:46+00:00

Using Bootstrap modal that contains tabs. The modal is called from a php generated

  • 0

Using Bootstrap modal that contains tabs. The modal is called from a php generated table of gallery names.

Table Data

<td>
<a href="#" class="galName" data-target="#myModal" data-toggle="modal" id="update_<?php echo $gal['id']; ?>" >
<?php echo $gal['name']; ?>
</a>
</td>

The modal opens and the first tab is selected on initial fire. If I navigate to another tab close the modal and select a different gallery the modal opens to the last tab that was open.

How do I make sure that when the modal is opened, it always opens to the first tab?

Modal Tabs

<ul id="myTab" class="nav nav-tabs">
  <li class="active">
       <a href="#home" data-toggle="tab">Home</a>
  </li>
  <li class="">
       <a id="uploadRevision" href="#upload" data-toggle="tab">Upload Revision</a>
  </li>
  <li class="">
       <a href="#editRev" data-toggle="tab">Edit Revision</a>
   </li>
 </ul>

.galName fires an initUpdate function in effort to set first tab as default. It sets the tab but tab content is not show.

function initUpdate()
{ 
  $('#myModal a:first').tab('show');
}

Thanks for the help.

  • 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-15T16:52:47+00:00Added an answer on June 15, 2026 at 4:52 pm

    Found the solution. Must remove the class=”active” from both tab and tabContent. Thanks to @merv – https://stackoverflow.com/a/11762931/1214858

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

Sidebar

Related Questions

I'm using Twitter Bootstrap modal featurs and loading data from remote locations. I'm providing
I am using bootstrap tabs on a custom modal (my own version). The tabs
I am using Twitter Bootstrap, (CSS and JS). The problem comes from the Modal
I am using a modal based on the example from twitter bootstrap. I have
So I'm using Twitter Bootstrap and I have a modal that slides down when
Any modal that I am creating using twitter bootstrap fails to appear. I'm not
I'm working on 'add a link' functionality. For that I'm using Modal plugin from
I currently have an app that is using a twitter bootstrap modal box. The
Using twitter bootstrap I want to conditionally disable the modal windows that it calls.
I'm using bootstrap's modal plugin in rails The website says I can gain the

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.