title: jQuery History plugin fires two ajax requests
body: <p>I am using the plugin jquery history in one of my web applications. The problem is, my when i click on a link, i notice in firebug that two ajax requests are sent. What could be the problem? I have attached my code below.
  Thank you for your help.</p>
  
  <pre><code>$(document).ready(function () { 
          $('a[href=' + window.location.hash + ']').addClass('selected');
      // History plugin
      $.history.init(function(hash) {
          if(hash != '') {
              getPage();
          } else {
              $('a[rel=tk]').click(function () {
                  var hash = this.href;
                  hash = hash.replace(/^.*#/, '');
                  $.history.load(hash);           
                  $('a[rel=tk]').removeClass('selected');
                  $(this).addClass('selected');
                  $(this).next('.loading').show();
  
                  getPage();
  
                  return false;
              });
          }
      });
          function getPage() {
      var page = 'page=' + encodeURIComponent(document.location.hash);
      // Filter pages
      $.ajax({
      url: "loader.php",  
      type: 'GET',        
      data: page,     
      cache: false,
      success: function (data) {  
              // Show Loadin icon
          $('.loading').hide();
          // Load content 
          $('#canvas').html(data);
      }       
      });
  }
  });
  </code></pre>
  
  <p>Thank you for your help!</p>