title: Jquery tabs reload content on button click
body: <p>I'm using jquery tabs (<a href="http://docs.jquery.com/UI/API/1.7.2/Tabs" rel="nofollow noreferrer">http://docs.jquery.com/UI/API/1.7.2/Tabs</a>). Jquery version 1.3.2 and Jquery UI version 1.7.2 and Ive been testing in firefox 3.5.6.</p>
  
  <p>When selecting a tab I just add the current date to the content area html. I also have a link with the class name "Button". When this link is clicked I want to reload the content of the currently selected tab. But with the solution I've tried I can't get it to work. I can see that the "button clicked" event is loaded but the following code isn't reloading my data:</p>
  
  <pre><code>$(".Tabs").tabs('load', $(".Tabs").tabs('option', 'selected'));
  </code></pre>
  
  <p>I have also been testing with:</p>
  
  <pre><code>var selected = $(".Tabs").tabs('option', 'selected');
  $(".Tabs").tabs('select', null);
  $(".Tabs").tabs('select', selected);
  </code></pre>
  
  <p>But that doesn't work either, my select method never gets called when pushing the button</p>
  
  <p>This is my jquery code:</p>
  
  <pre><code>    $(function() {
      var $tabs = $(".Tabs").tabs({
          selected: null,
          select: function() {
              alert("this doesn't run on button click");
              //Sets Content's html to current date
              $("#Content").html(new Date);
          }
      });
  
      $('.Button').click(function() {
          alert("this runs on button click");
          //Here I want to reload the current selected tab
          $(".Tabs").tabs('load', $(".Tabs").tabs('option', 'selected'));
          return false;
      });
      $('.Tabs').tabs('select', 0); // Select first tab
  });
  </code></pre>
  
  <p></p>
  
  <p>This is the html:</p>
  
  <pre><code>&lt;div class="Tabs"&gt;
      &lt;ul&gt;
          &lt;li&gt;&lt;a href="#Content"&gt;Tab1&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#Content"&gt;Tab2&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
      &lt;div id="Content"&gt;
  
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;a class='Button' href='#'&gt;Load Content Again&lt;/a&gt;
  </code></pre>