Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>There are several ways to do this, but before deciding which one to use, I'd want to make sure you actually want to piece out your files like that. What's keeping you from just putting the content inside of the tabs on the page as it is?</p> <p>If not, why not use PHP?</p> <p>If you decide to stick with your current plan, the way I'd accomplish what you're looking to do would be through jQuery and AJAX.</p> <p>First, you want to make sure you're using the proper Bootstrap structure – check out the <a href="http://getbootstrap.com/components/#nav">Tabbable Nav</a> section, and make your markup tabs correspond to empty content areas:</p> <pre><code> &lt;div class="tabbable" style="margin-bottom: 18px;"&gt; &lt;ul class="nav nav-tabs"&gt; &lt;li class="active"&gt;&lt;a href="#tab1" data-toggle="tab"&gt;Request Audit&lt;/a&gt;&lt;/li&gt; &lt;li class=""&gt;&lt;a href="#tab2" data-toggle="tab"&gt;Status&lt;/a&gt;&lt;/li&gt; &lt;li class=""&gt;&lt;a href="#tab3" data-toggle="tab"&gt;Settings&lt;/a&gt;&lt;/li&gt; &lt;li class=""&gt;&lt;a href="#tab4" data-toggle="tab"&gt;Help&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;div class="tab-content" style="padding-bottom: 9px; border-bottom: 1px solid #ddd;"&gt; &lt;div class="tab-pane active" id="tab1"&gt; &lt;p&gt;Placeholder 1&lt;/p&gt; &lt;/div&gt; &lt;div class="tab-pane" id="tab2"&gt; &lt;p&gt;Placeholder 2&lt;/p&gt; &lt;/div&gt; &lt;div class="tab-pane" id="tab3"&gt; &lt;p&gt;Placeholder 3&lt;/p&gt; &lt;/div&gt; &lt;div class="tab-pane" id="tab4"&gt; &lt;p&gt;Placeholder&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;​ </code></pre> <p>Then, use <a href="http://api.jquery.com/load/">jQuery.load</a> to fill in the <code>tab-panes</code>!</p> <pre><code>$('#tab2').load('/status.html'); $('#tab3').load('/settings.html'); $('#tab4').load('/help.html'); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload