title: Re attach tab content after i've detached on page load
body: <p>I am wanting to detach some of my tabs content on pageload. I do not have access to edit the existing tab script btw. I can only add jquery after tabs are loaded.</p>
  
  <p>I've done that successfully...</p>
  
  <pre><code> $(document).ready ( function(){ 
    $('#tabcontent1,#tabcontent2,#tabcontent3,#tabcontent4').detach();
   });
  </code></pre>
  
  <p>But i'm trying to re attach them as needed , here is HTML</p>
  
  <pre><code>&lt;div id="hometabs"&gt;
   &lt;ul id="tabs"&gt;      
    &lt;li class="" id="tab0" title="" onclick="javascript:show_tab('0');"&gt;&lt;a&gt;Tab0&lt;/a&gt;&lt;/li&gt;      
    &lt;li class="" id="tab1" title="" onclick="javascript:show_tab('1');"&gt;&lt;a&gt;Tab1&lt;/a&gt;&lt;/li&gt;      
    &lt;li class="" id="tab2" title="" onclick="javascript:show_tab('2');"&gt;&lt;a&gt;Tab2&lt;/a&gt;&lt;/li&gt;      
    &lt;li class="" id="tab3" title="" onclick="javascript:show_tab('3');"&gt;&lt;a&gt;Tab3&lt;/a&gt;&lt;/li&gt;      
    &lt;li class="" id="tab4" title="" onclick="javascript:show_tab('4');"&gt;&lt;a&gt;Tab4&lt;/a&gt;&lt;/li&gt;
   &lt;/ul&gt;    
  &lt;/div&gt;
  
  
  &lt;div style="" id="tabcontent0" class="homepagetabcontent"&gt;CONTENT&lt;/div&gt;
  &lt;div style="" id="tabcontent1" class="homepagetabcontent"&gt;CONTENT&lt;/div&gt;
  &lt;div style="" id="tabcontent2" class="homepagetabcontent"&gt;CONTENT&lt;/div&gt;
  &lt;div style="" id="tabcontent3" class="homepagetabcontent"&gt;CONTENT&lt;/div&gt;
  &lt;div style="" id="tabcontent4" class="homepagetabcontent"&gt;CONTENT&lt;/div&gt;
  </code></pre>
  
  <p>When i click on Tab1 , i'd like to add back #tabcontent1 , and then click Tab2 and re attach #tabcontent2 and so on....read some tuts , tried a few things , but haven't gotten anything to work.TIA</p>
  
  <p>Here is the show_tab function , which i do not have access to alter</p>
  
  <pre><code>function show_tab (tab_id) {
  
     var done = false;
     var counter = 0;
     while (! done) {
        var this_tab_content = document.getElementById("tabcontent" + counter);
        var this_tab = document.getElementById("tab" + counter);
        if (! this_tab_content) {
           done = true;
        } else {
           if (counter == tab_id) {
              this_tab_content.style.display = '';
              this_tab.className = "currenttab";
           } else {
              this_tab_content.style.display = 'none';
              this_tab.className = "";
           }
        }
        counter++;
     }
     location.hash = tab_id;
  }
  </code></pre>