title: Pretty Photo wont trigger when using .load?
body: <p>HI all, </p>
  
  <p>I am trying to load elements from #somediv in "page B" into my main #content div in my index.html file.</p>
  
  <p>I've tried reading through multiple posts on this site and I just can't seem to figure out what I'm doing wrong. I'm new to jquery so that probably explains my ineptitude!</p>
  
  <p>Anyway: Using Pretty Photo links on my main page works fine</p>
  
  <p>I have the relevant links to jQuery.js, prettyphoto.js &amp; css etc... and everything functions well.</p>
  
  <p>On "Page B", the one I'm trying to bring the contents of #somediv over to my index.html #content div - i also have the relevant links and pretty photo works fine on that page by itself as well.</p>
  
  <p>My problem: I'm using this function (called from my index.html page and located in an external file im calling from the head section of my index.html page if that helps) to load the contents of the external (but on the same domain) page.</p>
  
  <pre><code>   $(document).ready(function() {
    $("#EVL_1").click(function(event){
     $('#content').load('INFO_du.html #EVL_1');
      $("a[rel^='prettyPhoto']").prettyPhoto(); 
    });
    $("#EVL_2").click(function(event){
      $('#content').load('INFO_du.html #EVL_2');
      $("a[rel^='prettyPhoto']").prettyPhoto(); 
    });  });
  </code></pre>
  
  <p>and clicking on the link contained in the "Page B" #somediv that is loaded into my index.html page via .load using this script (see below)</p>
  
  <pre><code>&lt;span class="file"&gt;&lt;a href="Dry_Utility/test.html?iframe=true&amp;width=100%&amp;height=100%" rel="prettyPhoto[test]" title="A very old Sample for illustrative purposes!"&gt;Test - regular HTML&lt;/a&gt;&lt;/span&gt;
  </code></pre>
  
  <p>Works fine for loading the external div correctly, and on my desktop using IE, pretty photo pops up when I click on the link,</p>
  
  <p>But when i upload it to my server and try it, the link to test.html above doesn't open in pretty photo - it opens in a new window? (using IE, Chrome and Firefox) so I'm definately missing something:</p>
  
  <p>From reading through all the entries here, I've figured out that I must somehow call the prettyphoto javascript "I think" after the .load function. Thats when i added the following line after the .load section and it worked on my desktop (but nowhere else!)</p>
  
  <pre><code>        $("a[rel^='prettyPhoto']").prettyPhoto(); 
  </code></pre>
  
  <p>I have been trying different things I have found on this site all day and cant figure out how to make this work and get the prettyphoto.js to load after i do the .load and bring the div over to my main page.</p>
  
  <p>sorry if this is something realy stupid I'm just not getting it?</p>
  
  <p>One last thought: Im using .load to bring over #somediv, which contains the link above to a third page (also on same domain) test.html (maybe thats my problem?)</p>