title: how to get the first image from another page?
body: <p>So I have a page (www.domain.co.uk/index.html) where I need to get the url of an image from another page (www.domain.co.uk/photos.html)</p>
  
  <p>inside <code>www.domain.co.uk/photos.html</code> I have a load of photos. </p>
  
  <p>example of the images; where <code>foo</code>, <code>bar</code>, <code>baz</code> and <code>qux</code> are completely different strings :</p>
  
  <pre><code>&lt;tr&gt;
  &lt;th width="697" scope="col"&gt;
  &lt;div id="qux"&gt;
  &lt;a href="foo" target="_blank"&gt;&lt;img src="bar.jpg" alt="" width="700" height="525" class="baz"&gt;&lt;/a&gt;
  &lt;/div&gt;
  &lt;/th&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>How can I pin point one and get the url for <code>www.domain.co.uk/index.html</code> using javascript?</p>
  
  <hr>
  
  <p>Could I add a class <code>photo</code> that is the same for every image like this:</p>
  
  <pre><code>&lt;tr&gt;
  &lt;th width="697" scope="col"&gt;
  &lt;div id="qux"&gt;
  &lt;a href="foo" target="_blank"&gt;&lt;img src="bar.jpg" alt="" width="700" height="525" class="baz photo"&gt;&lt;/a&gt;
  &lt;/div&gt;
  &lt;/th&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>And then link to the class <code>.photo</code> and retrieve that from the url <code>www.domain.co.uk/photos.html</code></p>
  
  <hr>
  
  <p>I know how to do it with the current url.</p>
  
  <pre><code>$('.photo').attr('href')
  </code></pre>
  
  <p>But how do you perform that on another url?</p>