2

I have bootstrap tabs in bootstrap modal. When I open modal - it looks like tabs are working, because just the first div tab-content is shown and others are hidden.

But then I have a problem - when I click on tabs it fires shown event at my modal and in this event I'm loading contents of this modal. Because of this tabs are loading again and again and first tab stays always selected.

Modal documentation here: http://getbootstrap.com/2.3.2/javascript.html#modals

Tabs documentation here: http://getbootstrap.com/2.3.2/javascript.html#tabs

I initialize tabs like this:

<script type="text/javascript">
    $("#modeTabs a").click(function (e) {
        e.preventDefault();
        $(this).tab("show");
    });
</script>
Insane Skull
  • 9,220
  • 9
  • 44
  • 63
arfname
  • 379
  • 1
  • 4
  • 10
  • I had to do this recently and I saved the code on CSSDeck for future reference. Perhaps it might help you. You should be able to easily adapt it to your project. http://cssdeck.com/labs/pagination-buttons – davidcondrey Mar 22 '14 at 21:19

0 Answers0