title: Bootstrap navbar refresh on tab change
body: <p>I use twitter bootstrap's navbar. The content of each tab comes from a php function which loads data from the database. Once the page has loaded I'd like to be able to refresh the data under each tab (which is equal to calling the respective php functions again) on tab change. I guess that would be the jquery onclick() event but how do I update the content?</p>
  
  <pre><code>&lt;?php 
      require_once 'Offers.php';
      $offers = new Offers();
  ?&gt;
  
  &lt;div class="navbar"&gt;
     &lt;div class="navbar-inner"&gt;
      &lt;ul class="nav" id="mytab"&gt;
        &lt;li class="active"&gt;&lt;a href="#tab1" data-toggle="tab"&gt;A&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#tab2" data-toggle="tab"&gt;B&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#tab3" data-toggle="tab"&gt;C&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
  
   &lt;div class="tab-content"&gt;
       &lt;div class="tab-pane active" id="tab1"&gt;
         &lt;?php echo($offers-&gt;retrieveA());?&gt;   
       &lt;/div&gt;
       &lt;div class="tab-pane" id="tab2"&gt;
         &lt;?php echo($offers-&gt;retrieveB());?&gt;
       &lt;div class="tab-pane" id="tab3"&gt;
         &lt;?php echo($offers-&gt;retrieveC());?&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p></p>