title: Change the URL in the address bar using jQuery
body: <p>I have written the following to do AJAX requests in my app:</p>
  
  <p>$(document).ready(function () {</p>
  
  <pre><code>    $('ul#ui-ajax-tabs li:first').addClass('selected');
  
      $('#ui-ajax-tabs li a').click(function (e) {
  
          e.preventDefault();
  
          $("#ui-ajax-tabs li").removeClass("selected");
  
          $(this).parents('li').addClass("loading");
  
          var url = $(this).attr("href");
          var link = $(this);
          console.log(url);
  
          $.ajax({
              url: url,
              success: function (responseHtml) {
                  $('div#ui-tab-content').html($(responseHtml).find('div#ui-tab-content &gt; div#ui-ajax-html'));
                  $(link).parents('li').addClass('selected');
                  $("#ui-ajax-tabs li").removeClass("loading");
              },
              error: function () {
                  $('div#ui-tab-content').html('&lt;div class="message error"&gt;Sorry that page doesn\'t exist&lt;/div&gt;');
                  $(link).parents('li').addClass('selected');
                  $("#ui-ajax-tabs li").removeClass("loading");
              }
          });
  
      });
  
  });
  </code></pre>
  
  <p>However I also want to change the url in the address bar to match what I just loaded in. I have looked around at some demos using the new HTML5 History API @ <a href="http://html5demos.com/history" rel="nofollow">http://html5demos.com/history</a> but it's not making any sense.</p>
  
  <p>Could someone show an example of how I could use the new history stuff in my code? Would be really appreciated. Thanks.</p>
  
  <p>Thanks</p>