title: jQuery load html file into <div>
body: <p>I wanted to know how I can use an html file and use it to replace the space inside a </p>
  
  <p>I know you can do it with jquery but for some reason it isn't working out for me.
  I have:</p>
  
  <pre><code>$(document).ready(function() {    
      $('#nav li a').click(function(){  
          var toLoad = $(this).attr('href');  
          $('#main').hide('fast',loadContent);   
          function loadContent() {  
              $('#main').load(toLoad);  
          }  
          return false; 
      });  
  });  
  </code></pre>
  
  <p>So whenever I click a link from my navbar it should edit the #main div and bring up the corresponding html file to replace the div with. For some reason it just leaves it blank.</p>