title: Dynamic tabs and load page in the tabs without using iframe in twitter bootstrap
body: <p>I am using twitter bootstrap. I have a menu and I want to add a dynamic tab when user click on the menu. New tab will load another page but I don't want to use iframe for loading the page.</p>
  
  <p>Do you guys have any solution for that?</p>
  
  <hr>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
      &lt;meta name="description" content=""&gt;
      &lt;meta name="author" content=""&gt;
      &lt;link rel="shortcut icon" href="../ico/favicon.ico"&gt;
  
      &lt;title&gt;Theme Template for Bootstrap&lt;/title&gt;
  
      &lt;script src="css_link.js"&gt;&lt;/script&gt;
  
      &lt;style type="text/css"&gt;
          .tabs-header{
            border-style: none;
          }
  
          .tabs-panels {
              margin: 0px;
              padding: 0px;
              border-width: 0px 1px 1px;
              border-style: none;
              overflow: hidden;
          }
  
          .easyui-tabs{
            width: auto;
            height: auto; 
          }
  
          .tabs-container{
            width: auto;
            height: auto;
          }
  
          .panel-body .panel-body-noheader .panel-body-noborder iframe{
            height: 100%;
          }
      &lt;/style&gt;
  
      &lt;script&gt;
        function addTab(title, url){
          if ($('#tt').tabs('exists', title)){
            $('#tt').tabs('select', title);
          } else {
            var content = '&lt;iframe scrolling="auto" frameborder="0"  src="'+url+'" style="width:100%;height:560px;"&gt;&lt;/iframe&gt;';
            $('#tt').tabs('add',{
              title:title,
              content:content,
              closable:true
            });
          }
        }
      &lt;/script&gt;
  
  
      &lt;!-- Just for debugging purposes. Don't actually copy this line! --&gt;
      &lt;!--[if lt IE 9]&gt;&lt;script src="../../assets/js/ie8-responsive-file-warning.js"&gt;&lt;/script&gt;&lt;![endif]--&gt;
  
      &lt;!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --&gt;
      &lt;!--[if lt IE 9]&gt;
        &lt;script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"&gt;&lt;/script&gt;
        &lt;script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"&gt;&lt;/script&gt;
      &lt;![endif]--&gt;
  
    &lt;/head&gt;
  
    &lt;body role="document"&gt;
  
      &lt;script src="header.js"&gt;&lt;/script&gt;
  
        &lt;div class="container-fluid"&gt;
          &lt;div class="row"&gt;
            &lt;div class="col-lg-3 col-md-3 col-sm-3 col-md-3 col-xs-5 sidebar"&gt;
  
            &lt;ul id="myTab" class="nav nav-tabs"&gt;
              &lt;li class="active"&gt;&lt;a href="#home" data-toggle="tab"&gt;&lt;span class="glyphicon glyphicon-envelope" style="font-size: 25px;"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
              &lt;li class=""&gt;&lt;a href="#profile" data-toggle="tab"&gt;&lt;span class="glyphicon glyphicon-envelope" style="font-size: 25px;"&gt;&lt;/a&gt;&lt;/li&gt;
              &lt;li class=""&gt;&lt;a href="#profile" data-toggle="tab"&gt;&lt;span class="glyphicon glyphicon-envelope" style="font-size: 25px;"&gt;&lt;/a&gt;&lt;/li&gt;
              &lt;li class=""&gt;&lt;a href="#profile" data-toggle="tab"&gt;&lt;span class="glyphicon glyphicon-envelope" style="font-size: 25px;"&gt;&lt;/a&gt;&lt;/li&gt;
  
            &lt;/ul&gt;
  
            &lt;div id="myTabContent" class="tab-content"&gt;
              &lt;div class="tab-pane fade active in" id="home"&gt;
                &lt;div class="container"&gt;
  
                &lt;!-- treeeeeeeeeeeee --&gt;
                  &lt;!-- &lt;div class="col-md-3"&gt; --&gt;
                      &lt;!-- &lt;div class="well col-md-2"&gt; --&gt;
                          &lt;ul class="nav nav-list"&gt;
                              &lt;li&gt;&lt;label class="tree-toggler nav-header"&gt;&lt;b class="caret"&gt;&lt;/b&gt; Product&lt;/label&gt;
                                  &lt;ul class="nav nav-list tree"&gt;
                                      &lt;li&gt;&lt;a href="#" onclick="addTab('Catagory', 'catagory.html')"&gt;Catagory&lt;/a&gt;&lt;/li&gt;
                                      &lt;li&gt;&lt;a href="#" onclick="addTab('Software', 'software.html')"&gt;Software&lt;/a&gt;&lt;/li&gt;
                                  &lt;/ul&gt;
                              &lt;/li&gt;
                              &lt;li class="nav-divider col-lg-2 col-md-2 col-sm-3 col-xs-4"&gt;&lt;/li&gt;&lt;br&gt;
                              &lt;li&gt;&lt;label class="tree-toggler nav-header"&gt;&lt;b class="caret"&gt;&lt;/b&gt; Header 2&lt;/label&gt;
                                  &lt;ul class="nav nav-list tree"&gt;
                                      &lt;li&gt;&lt;a href="#"&gt;Link&lt;/a&gt;&lt;/li&gt;
                                      &lt;li&gt;&lt;a href="#"&gt;Link&lt;/a&gt;&lt;/li&gt;
                                      &lt;li&gt;&lt;label class="tree-toggler nav-header"&gt;Header 2.1&lt;/label&gt;
                                          &lt;ul class="nav nav-list tree"&gt;
                                              &lt;li&gt;&lt;a href="#"&gt;Link&lt;/a&gt;&lt;/li&gt;
                                              &lt;li&gt;&lt;a href="#"&gt;Link&lt;/a&gt;&lt;/li&gt;
                                              &lt;li&gt;&lt;label class="tree-toggler nav-header"&gt;Header 2.1.1&lt;/label&gt;
                                                  &lt;ul class="nav nav-list tree"&gt;
                                                      &lt;li&gt;&lt;a href="#"&gt;Link&lt;/a&gt;&lt;/li&gt;
                                                      &lt;li&gt;&lt;a href="#"&gt;Link&lt;/a&gt;&lt;/li&gt;
                                                  &lt;/ul&gt;
                                              &lt;/li&gt;
                                          &lt;/ul&gt;
                                      &lt;/li&gt;
                                      &lt;li&gt;&lt;label class="tree-toggler nav-header"&gt;Header 2.2&lt;/label&gt;
                                          &lt;ul class="nav nav-list tree"&gt;
                                              &lt;li&gt;&lt;a href="#"&gt;Link&lt;/a&gt;&lt;/li&gt;
                                              &lt;li&gt;&lt;a href="#"&gt;Link&lt;/a&gt;&lt;/li&gt;
                                              &lt;li&gt;&lt;label class="tree-toggler nav-header"&gt;Header 2.2.1&lt;/label&gt;
                                                  &lt;ul class="nav nav-list tree"&gt;
                                                      &lt;li&gt;&lt;a href="#"&gt;Link&lt;/a&gt;&lt;/li&gt;
                                                      &lt;li&gt;&lt;a href="#"&gt;Link&lt;/a&gt;&lt;/li&gt;
                                                  &lt;/ul&gt;
                                              &lt;/li&gt;
                                          &lt;/ul&gt;
                                      &lt;/li&gt;
                                  &lt;/ul&gt;
                              &lt;/li&gt;
                          &lt;/ul&gt;
                      &lt;!-- &lt;/div&gt; --&gt;
                  &lt;!-- &lt;/div&gt; --&gt;
                &lt;/div&gt;   
                &lt;!-- treeeeeeeeeee  --&gt;
  
              &lt;/div&gt;
              &lt;div class="tab-pane fade" id="profile"&gt;
                &lt;p&gt;Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.&lt;/p&gt;
  
              &lt;/div&gt;
              &lt;div class="tab-pane fade" id="dropdown1"&gt;
                &lt;p&gt;Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.&lt;/p&gt;
              &lt;/div&gt;
              &lt;div class="tab-pane fade" id="dropdown2"&gt;
                &lt;p&gt;Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.&lt;/p&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;!-- main page --&gt;
          &lt;div class="col-lg-9 col-lg-offset-3 col-md-9 col-md-offset-3 col-sm-offset-3 col-xs-offset-5"&gt;
  
            &lt;div id="tt" class="easyui-tabs"&gt;
              &lt;div title="Deshboard"&gt;
                &lt;h1 class="page-header"&gt;Dashboard&lt;/h1&gt;
  
                &lt;div class="row placeholders"&gt;
                  &lt;div class="col-xs-6 col-sm-3 placeholder"&gt;
                    &lt;img data-src="holder.js/200x200/auto/sky" class="img-responsive" alt="Generic placeholder thumbnail"&gt;
                    &lt;h4&gt;Label&lt;/h4&gt;
                    &lt;span class="text-muted"&gt;Something else&lt;/span&gt;
                  &lt;/div&gt;
                  &lt;div class="col-xs-6 col-sm-3 placeholder"&gt;
                    &lt;img data-src="holder.js/200x200/auto/vine" class="img-responsive" alt="Generic placeholder thumbnail"&gt;
                    &lt;h4&gt;Label&lt;/h4&gt;
                    &lt;span class="text-muted"&gt;Something else&lt;/span&gt;
                  &lt;/div&gt;
                  &lt;div class="col-xs-6 col-sm-3 placeholder"&gt;
                    &lt;img data-src="holder.js/200x200/auto/sky" class="img-responsive" alt="Generic placeholder thumbnail"&gt;
                    &lt;h4&gt;Label&lt;/h4&gt;
                    &lt;span class="text-muted"&gt;Something else&lt;/span&gt;
                  &lt;/div&gt;
                  &lt;div class="col-xs-6 col-sm-3 placeholder"&gt;
                    &lt;img data-src="holder.js/200x200/auto/vine" class="img-responsive" alt="Generic placeholder thumbnail"&gt;
                    &lt;h4&gt;Label&lt;/h4&gt;
                    &lt;span class="text-muted"&gt;Something else&lt;/span&gt;
                  &lt;/div&gt;
                &lt;/div&gt;
  
  
  
  
  
  
                &lt;button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal"&gt;
    Launch demo modal
  &lt;/button&gt;
  
  &lt;!-- Modal --&gt;
  &lt;div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt;
    &lt;div class="modal-dialog"&gt;
      &lt;div class="modal-content"&gt;
        &lt;div class="modal-header"&gt;
          &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;&amp;times;&lt;/button&gt;
          &lt;h4 class="modal-title" id="myModalLabel"&gt;Modal title&lt;/h4&gt;
        &lt;/div&gt;
        &lt;div class="modal-body"&gt;
          ...
        &lt;/div&gt;
        &lt;div class="modal-footer"&gt;
          &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
          &lt;button type="button" class="btn btn-primary"&gt;Save changes&lt;/button&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
  
  
  
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;/div&gt;
  
  
  
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;!-- main container --&gt;
  
      &lt;!-- main container --&gt;
  
  
      &lt;script src="footer.js"&gt;&lt;/script&gt;   
  
  
  
      &lt;!-- Bootstrap core JavaScript
      ================================================== --&gt;
      &lt;!-- Placed at the end of the document so the pages load faster --&gt;
      &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"&gt;&lt;/script&gt;
      &lt;script src="../js/bootstrap.min.js"&gt;&lt;/script&gt;
      &lt;script src="../docs.min.js"&gt;&lt;/script&gt;
  
  
      &lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"&gt;&lt;/script&gt;
  
      &lt;script type="text/javascript"&gt;
        $('label.tree-toggler').click(function () {
          $(this).parent().children('ul.tree').toggle(300);
        });
      &lt;/script&gt;
  
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>