title: How can I go to a specific tab after a click event using jquery?
body: <p>How can I go to a specific tab after a click event, I tried <code>$("#tabs").tabs()</code> since every time I refresh it go back to its original but still does not work, what is the right way of doing it?</p>
  
  <p>Here's my jquery code:   </p>
  
  <pre><code>$(function() {
      $("#tabs").tabs();
      $("#btn").click(function() {
      //what to put here?
      //I tried this but do not work, since i notice every refresh it go back to its original tab
      $("#tabs").tabs();
      });
  });
  </code></pre>
  
  <p>Here's my HTML Code:</p>
  
  <pre><code>&lt;div id="tabs"&gt;
  &lt;ul&gt;
  &lt;li&gt;&lt;a href="#login"&gt;Login&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#register"&gt;Register&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;div id="login"&gt;
  &lt;/div&gt;
  &lt;div id="register"&gt;
  &lt;/div&gt;
  </code></pre>