Adding and removing twitter bootstrap tabs and icons

I would like to use bootstrap built into tabs on my site, but I need it so that users can add or remove tabs themselves. I saw several demos of jqueryUI tabs that allow the user to add or remove them, and I know that the boot tabs are jquery themselves, so I know that it should be a pretty simple script to add this functionality, but I just can "t figure it out does anyone know how to do this?

+3
source share
1 answer

Tabs are activated individually , so you can simply add / remove an item from the DOM and call it $().tab('show').

, :

<div class="tab-content">
  <div class="tab-pane" id="existingTab">..</div>
</div>

:

$('.tab-content')
    .append(
        $('<div></div>')
            .addClass('tab-pane')
            .attr('id', 'newTab')
    );

$('#newTab').tab('show');

.

+2

All Articles