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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:10:13+00:00 2026-06-08T10:10:13+00:00

I am using Twitter bootstrap in my application. In a specific case, i need

  • 0

I am using Twitter bootstrap in my application. In a specific case, i need to add tabs dynamically after an ajax request.

I added the li tag for tab head and the respective content area with relevent id specified in href of the tab head anchor.

But the newly added tabs are not working with the bootstrap tabs.
I even tried to refresh the tabs functionality by calling $("#tabs1").tabs() right after a new tab is added dynamically, but no use.

Please suggest me on how to use bootstrap tabs with dynamic data.

Note : But all other tabs which were there during page load works just fine.

  • 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-08T10:10:15+00:00Added an answer on June 8, 2026 at 10:10 am

    You have to initialize the tabs by using $(...).on() instead of $(...).click(). On this way you can bind the click event to the parent #myTab-element and not directly to the child a-tags.

    $("#myTab").on("click", "a", function(e){
      e.preventDefault();
      $(this).tab('show');
    });
    

    Now the click-Event will be bount to the #myTab-Element and delegated to the child a-Tags.

    • here you can find a running demo
    • read the jQuery doc for more info on “on Event Handlers”
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey so I am using Rails PJAX for my web application with twitter bootstrap
Using Twitter Bootstrap's [Tabbable Tabs][1], it says to: Enable tabbable tabs via javascript (each
In my Rails 3 application I'm using Twitter Bootstrap as a frame work for
I'm using twitter bootstrap to create togglable tabs. Here is the css I'm using:
I'm using Twitter Bootstrap as a framework on my Ruby on Rails application. I
I am using Bootstrap, from Twitter for genereting modal-dialog in a Marionette Application. I
Using twitter bootstrap, and I need to initiate active class to the li portion
I've been building an application using Twitter Bootstrap v2.0.2 as the framework, and I've
Using Twitter Bootstrap's bootstrap-tab.js, I have: <ul class=tabnavcenter id=myTab> <li class=active><a href=#home data-toggle=tab>about</a></li> <li><a
I am using twitter bootstrap and I would like a container div to stretch

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.