title: JQuery UI tabs wont save selected tab index upon page reload
body: <p>When I use AJAX or PHP POST the page reloads and the tabs bounce back to index position 0, which is quite annoying. You can find the code below. I am trying to save the tab index in a cookie and use it to return to the selected tab even after the page reloads.</p>
  
  <p>The code is here:</p>
  
  <pre><code>$(function() {
      $( "#tabs" ).tabs().find( ".ui-tabs-nav" ).sortable({ axis: "x" });
      $(document).ready(function() {
         $( "#tabs" ).tabs('select', $.cookie("tabNumber"));
  
         $( "#tabs" ).click(function() {
           $.cookie("tabNumber", $( "#tabs" ).tabs('option', 'selected'));
         });
      });
  });
  </code></pre>
  
  <p>Maybe someone can help me to find out how to make it work?</p>