Q:

How to get jquery stars id value?

On my page i have radio buttons...   
<div class="stars-wrapper1">    
   <input type="radio"  name="newrate" value="1" title="VeryPoor" @Html.Raw((Model.review == 1?"checked=\"checked\"":""))  />                        
   <input type="radio"  name="newrate" value="2" title="Poor" @Html.Raw((Model.review == 2?"checked=\"checked\"":""))  />    
   <input type="radio"  name="newrate" value="3" title="Average"  @Html.Raw((Model.review == 3?"checked=\"checked\"":"")) />
   <input type="radio" name="newrate" value="4" title="Good" @Html.Raw((Model.review == 4?"checked=\"checked\"":"")) />
   <input type="radio"  name="newrate" value="5" title="Excellent"@Html.Raw((Model.review == 5?"checked=\"checked\"":""))  />     
   <input type="hidden" name="rate" value="@Model.ThePhoto.ID" disabled="disabled">                    
</div>

They are radio buttons and when i use the function stars they turn into this..
<div class="stars-wrapper1">    
   <input type="hidden" name="rate" value="41" disabled="disabled">                    
      <div class="ui-stars-star ui-stars-star-on ui-stars-star-disabled">
          <a title="">1</a></div>
      <div class="ui-stars-star ui-stars-star-on ui-stars-star-disabled">
          <a title="">2</a></div>
      <div class="ui-stars-star ui-stars-star-on ui-stars-star-disabled">
           <a title="">3</a></div>
      <div class="ui-stars-star ui-stars-star-disabled">
           <a title="">4</a></div>
      <div class="ui-stars-star ui-stars-star-disabled">
           <a title="">5</a>
      </div>
       <input type="hidden" name="newrate" value="0" disabled="disabled">
 </div>

When I click on a star i hidden value so i can save into my db this is the rating this photo received, but i cant get 'this' hidden value, i get 41 al the time the first photo id, there are several of these stars on the page with different hidden IDs  
jquery:
$(document).ready(function () {
    $(".stars-wrapper1").stars({
        oneVoteOnly: true
    });
    $('.stars-wrapper1 a ').click(function () {
        alert($('input:hidden[name$=rate]').val());
    });
}); 

There are many different images with these stars on one page, so the rel is how im trying to find out what image the user has rated.
This is where i got stars form ... Star Rating Plugin

A:

The value is stored in an hidden input. You could try something like:
$('.stars-wrapper1 a ').click(function () {
    alert($('input:hidden', this).val());
});

To be even more precise, the input's name seems t end with rate, so you could try also
$('.stars-wrapper1 a ').click(function () {
    alert($('input:hidden[name$=rate]', this).val());
});

