title: How can I reload a jquery tab on form submit?
body: <p>I use jquery for ajax tabs, not jquery UI that is to large for my needs
  This code below is my ajax tabs, it loads the selected tab with an external file</p>
  
  <p>I also have a for that uses ajax to post data to this page HOMEfriendstatus.inc.php which is #tab2</p>
  
  <p>What I want to know when I submit the form, regardless of what tab the user has loaded on the screen, can I make it reload or change to #tab2 to show the updated content of #tab2?</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  var pageUrl = new Array();          
  pageUrl[1] = "HOMEbulletin.inc.php";
  pageUrl[2] = "HOMEfriendstatus.inc.php";
  pageUrl[3] = "HOMEbulletin.inc.php";
  
  
  
  function loadTab(id){
      if (pageUrl[id].length &gt; 0){
          $("#loading").show();
          $.ajax({url: pageUrl[id], cache: false, success: function(message) {                            
              $("#tabcontent").empty().append(message);
              $("#loading").hide();             
          }
      });                 
  }
  }
  
  $(document).ready(function(){
      /*$("#tab1").addClass('selected');*/
      $("#loading").hide();
      $("#tab1").click(function(){
          loadTab(1);
          $('div.HOMEtabdiv ul.HOMEtabs a').removeClass('selected');
          $(this).addClass('selected');
      });
  
      $("#tab2").click(function(){
          loadTab(2);
          $('div.HOMEtabdiv ul.HOMEtabs a').removeClass('selected');
          $(this).addClass('selected');
      });
  
      $("#tab3").click(function(){
          loadTab(3);
          $('div.HOMEtabdiv ul.HOMEtabs a').removeClass('selected');
          $(this).addClass('selected');
      });
      });
  &lt;/script&gt;
  </code></pre>