title: jQuery loading and relative paths
body: <p>I'm using jQuery to load page content like so:</p>
  
  <pre><code>$("#content").load(path);
  </code></pre>
  
  <p>Where the content files are purely content like such:</p>
  
  <pre><code>&lt;!--page.php--&gt;
  I am content
  </code></pre>
  
  <p>However, when I want to include images in my content like this:</p>
  
  <pre><code>&lt;!--page.php--&gt;
  &lt;img src="images/image.jpg"/&gt;
  </code></pre>
  
  <p>The path only works relative to the origin of the jQuery script instead of the page.php file, so the following example would not work with the code above:</p>
  
  <pre><code>Directory tree:
  
  index.php
  jQuery.js
  pages/
    page.php
    images/
      image.jpg
  </code></pre>
  
  <p>Because it's making page.php relative where the jQuery is, at the root of the site so it can't find the images folder unless I give it an exact path which in my actual site changes all the time depending on where the content file is located.</p>
  
  <p>Is there a non-hacky way around this that doesn't involve me putting the exact path in every image or content I want to reference?</p>