jquery, how to retrieve a set of values
<pre><code> var $ds=$('.stars-wrapper1').each(function(i) {

     alert($(this).find(':first').attr('title'));
 });
</code></pre>

<p>I wan to get the attribute of each first child from each stars-wrapper1 class, in my code.</p>

<p>Here is how it looks:</p>

<pre><code>        &lt;div class="stars-wrapper1"&gt;
            &lt;input type="radio" name="newrate" value="1" title="&lt;?php echo $commentID;?&gt;"  /&gt;
            &lt;input type="radio" name="newrate" value="2" title="&lt;?php echo $commentID;?&gt;"  /&gt;
            &lt;input type="radio" name="newrate" value="3" title="&lt;?php echo $commentID;?&gt;" /&gt;
            &lt;input type="radio" name="newrate" value="4" title="&lt;?php echo $commentID;?&gt;"  /&gt;
            &lt;input type="radio" name="newrate" value="5" title="&lt;?php echo $commentID;?&gt;" /&gt;
            &lt;input type="radio" name="newrate" value="6" title="&lt;?php echo $commentID;?&gt;" /&gt;
            &lt;input type="radio" name="newrate" value="7" title="&lt;?php echo $commentID;?&gt;" /&gt;
            &lt;input type="radio" name="newrate" value="8" title="&lt;?php echo $commentID;?&gt;" /&gt;
            &lt;input type="radio" name="newrate" value="9" title="&lt;?php echo $commentID;?&gt;" /&gt;
            &lt;input type="radio" name="newrate" value="10" title="&lt;?php echo $commentID;?&gt;" /&gt;

        &lt;/div&gt;
</code></pre>

<p>I want to get the title.. 
But all I get is an empty value in the alert. Note: I have several classes named stars-wrapper1..so I have to iterate over them and get the first attribute of the first child..something which I fail to do! :(</p>

<p><strong>UPDATE:
What the page sees:</strong></p>

<pre><code>     Rating: &lt;span class="stars-cap"&gt;&lt;/span&gt;
        &lt;div class="stars-wrapper1"&gt;
            &lt;input type="radio" name="newrate" value="1" title="23"  /&gt;
            &lt;input type="radio" name="newrate" value="2" title="23"  /&gt;
            &lt;input type="radio" name="newrate" value="3" title="23" /&gt;

            &lt;input type="radio" name="newrate" value="4" title="23"  /&gt;
            &lt;input type="radio" name="newrate" value="5" title="23" /&gt;
            &lt;input type="radio" name="newrate" value="6" title="23" /&gt;
            &lt;input type="radio" name="newrate" value="7" title="23" /&gt;
            &lt;input type="radio" name="newrate" value="8" title="23" /&gt;
            &lt;input type="radio" name="newrate" value="9" title="23" /&gt;
            &lt;input type="radio" name="newrate" value="10" title="23" /&gt;

        &lt;/div&gt;
</code></pre>
