title: Javascript IE error: unexpected call to method or property access
body: <p>I have the following code and it's working (as usual) in everything but IE. It's giving me an unexpected call to method or property access in Jquery and I have no idea how to debug it. I've been using the IE developer toolbar, which is useless for this error and just gives me a line no 12 (inside the jquery script).</p>
  
  <p>Any help is v much appreciated:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function () {
  
      $.history.init(pageload);
  
      $('a[href=' + window.location.hash + ']').addClass('selected');
  
      $('a[rel=ajax]').click(function () {
  
          var hash = this.href;
          hash = hash.replace(/^.*#/, '');
          $.history.load(hash);
  
          $('a[rel=ajax]').removeClass('selected');
          $(this).addClass('selected');
          $('.loading').show();
  
          getPage();
  
          return false;
      });
  });
  
  function pageload(hash) {
      if (hash) getPage();
  }
  
  function getPage() {
  
      hash = document.location.hash;
      hash = hash.replace(/^.*#/, '');
      var data = 'page=' + encodeURIComponent(hash);
      $.ajax({
          url: "index.php",
          type: "POST",
          data: data,
          cache: false,
          success: function (html) {
              $('.loading').hide();
              $('tbody').html(html);
  
          }
      });
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>Here is the history plugin: <a href="http://plugins.jquery.com/project/history" rel="nofollow noreferrer">http://plugins.jquery.com/project/history</a></p>
  
  <p>And here is the demo I have been following:
  <a href="http://plugins.jquery.com/project/history" rel="nofollow noreferrer">http://plugins.jquery.com/project/history</a></p>
  
  <p>Still changing window.location back to document.location doesn't seem to make a difference</p>
  
  <p>I'm lost on this one. When I change the tag I'm calling to  it does post so it's working, but in IE the design is all broken and the next links I click on don't post. Really strange!! Works fine in firefox, opera, etc.</p>