title: Get specific href attribute from another page
body: <p>I'm using jQuery .get to grab elements from another page; I want to get the "nth" href attribute, which I'm trying to do with the code below. As you can see, I'm trying to change the value of an ID to a specific URL. I think there's a problem with my use of .find, but couldn't figure out. Thanks a ton for any help.</p>
  
  <p><strong>JS</strong></p>
  
  <pre><code>$.get('/file.xml', function(data)
  {
      var $links = $(data).find('a').attr('href'),
      selectedlink = $links.eq(selectedValue);
      var link = selectedlink.text();
      $("#fvlink").val(link);
  
  });
  </code></pre>
  
  <p><strong>HTML page with URLs</strong></p>
  
  <pre><code>&lt;body&gt;
    &lt;li&gt;&lt;h2&gt;&lt;a href="http://www.whatever1.coy"&gt;2060&lt;/a&gt;&lt;/h2&gt;&lt;span class="desctext"&gt;This is the second slide&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;h2&gt;&lt;a href="http://www.whatever2.com"&gt;2057&lt;/a&gt;&lt;/h2&gt;&lt;span class="desctext"&gt;This is the third slide&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;h2&gt;&lt;a href="http://www.whatever3.com"&gt;2056&lt;/a&gt;&lt;/h2&gt;&lt;span class="desctext"&gt;This is the fourth slide&lt;/span&gt;&lt;/li&gt;
  &lt;/body&gt;
  </code></pre>