title: jQuery load with variable instead of element id
body: <p>i've got a slight jQuery problem.
  What i want is to load a particular area of an external html doc into a div,
  instead it loads the whole document, not the specified area.</p>
  
  <p>This is the trigger:</p>
  
  <pre><code>$('a').click(function(){ // my link to trigger the load
      var pid = $(this).attr('href'); //the pid is the links href
      getproject(pid); //trigger the load function, pass variable
  });
  </code></pre>
  
  <p>This is the triggered function:</p>
  
  <pre><code>function getproject(pid) {
      $('#container').load('data.html', pid);
  }
  </code></pre>
  
  <p>So when i click my link, it should load the element with the id (#) specified by the link into my container, but it loads the whole data... i cant seem to find a solution to this.</p>
  
  <p>The Link looks like this (cant use exact markup here):
  a href="#elementtoload"</p>
  
  <p>The data document looks like this:
  div id="elementtoload"
  div id="..."</p>
  
  <p>and loads of more elements with content, which should be loaded by id from the links href.</p>