title: How to restrict selection of radio button to one time
body: <p>I'm trying to restrict the multiple counting in <a href="http://jsfiddle.net/mgvto6k1/3/" rel="nofollow">this jsfiddle</a> . So once I rated by selecting a radio button I want to store this information so that the counter won't add more "rates". How can I restrict eace counter to go up only once?</p>
  
  <p><strong>HTML :</strong></p>
  
  <pre><code>&lt;div class="stars float-left"&gt;
      &lt;div class="rating" style="width:99%"&gt;&lt;/div&gt;
      &lt;p&gt;
          &lt;input type="radio" name="rating" id="star5" value="5" /&gt;
          &lt;label for="star5"&gt;&lt;/label&gt;
          &lt;input type="radio" name="rating" id="star4" value="4"&gt;
          &lt;label for="star4"&gt;&lt;/label&gt;
          &lt;input type="radio" name="rating" id="star3" value="3" /&gt;
          &lt;label for="star3"&gt;&lt;/label&gt;
          &lt;input type="radio" name="rating" id="star2" value="2"&gt;
          &lt;label for="star2"&gt;&lt;/label&gt;
          &lt;input type="radio" name="rating" id="star1" value="1" /&gt;
          &lt;label for="star1"&gt;&lt;/label&gt;
      &lt;/p&gt;
      &lt;span class="rate"&gt;Rate! (62)&lt;/span&gt;
  &lt;/div&gt;
  
  &lt;div class="stars float-left"&gt;
      &lt;div class="rating" style="width:99%"&gt;&lt;/div&gt;
      &lt;p&gt;
          &lt;input type="radio" name="rating" id="star5" value="5" /&gt;
          &lt;label for="star5"&gt;&lt;/label&gt;
          &lt;input type="radio" name="rating" id="star4" value="4"&gt;
          &lt;label for="star4"&gt;&lt;/label&gt;
          &lt;input type="radio" name="rating" id="star3" value="3" /&gt;
          &lt;label for="star3"&gt;&lt;/label&gt;
          &lt;input type="radio" name="rating" id="star2" value="2"&gt;
          &lt;label for="star2"&gt;&lt;/label&gt;
          &lt;input type="radio" name="rating" id="star1" value="1" /&gt;
          &lt;label for="star1"&gt;&lt;/label&gt;
      &lt;/p&gt;
      &lt;span class="rate"&gt;Rate! (20)&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>JS :</strong></p>
  
  <pre><code>$('.stars input:radio').click(function() {
      str_rate = $(this).closest('div').find('span.rate');
      var rate_string = $(str_rate).text();
      var rate = parseInt(rate_string.substring(rate_string.indexOf("(") + 1,rate_string.indexOf(")")),10) + 1;
      $(str_rate).text("Rate! (" + rate + ")");
  });
  </code></pre>