getting rel attr of link and using as text recurring
<p>I'm trying to get the rel attr from a set of links in a slider, to then use as the text for the control.  I've got it working except it only lists the first rel multiple times, instead of multiple rels once. </p>

<p>My jQuery is</p>

<pre><code>jQuery("#slider li a").each(function() {

    var yearValue = $(this).attr('rel');

jQuery('#controls li a').text(yearValue);
});
</code></pre>

<p>and the output html is</p>

<pre><code> &lt;div id="slider"&gt;
  &lt;ul&gt;
    &lt;li&gt;&lt;a rel="foo" href="#"&gt;&lt;img src="image1.jpg" alt="alt" /&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a rel="bar" href="#"&gt;&lt;img src="image2.jpg" alt="alt" /&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;
&lt;ol id="controls"&gt;
  &lt;li id="controls1" class="first"&gt;&lt;a href="javascript:void(0);" rel="0"&gt;foo&lt;/a&gt;&lt;/li&gt;
  &lt;li id="controls2" class="current"&gt;&lt;a href="javascript:void(0);" rel="1"&gt;foo&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;    
</code></pre>

<p>I need to the ol to have <strong>foo</strong> and <strong>bar</strong>, not <strong>foo</strong> and <strong>foo</strong></p>

<p>Any ideas?  Much appreciated</p>
