title: detect input from multiple opton in jQuery
body: <p>I am building rating system with css.</p>
  
  <p>My html code is:</p>
  
  <pre><code>&lt;div class="rating"&gt;
      &lt;input type="radio" id="star5" name="rating" value="5" /&gt;
      &lt;label for="star5" title="Awesome..!"&gt;5 stars&lt;/label&gt;
      &lt;input type="radio" id="star4" name="rating" value="4" /&gt;
      &lt;label for="star4" title="Pretty good"&gt;4 stars&lt;/label&gt;
      &lt;input type="radio" id="star3" name="rating" value="3" /&gt;
      &lt;label for="star3" title="Ok!"&gt;3 stars&lt;/label&gt;
      &lt;input type="radio" id="star2" name="rating" value="2" /&gt;
      &lt;label for="star2" title="Kinda bad"&gt;2 stars&lt;/label&gt;
      &lt;input type="radio" id="star1" name="rating" value="1" /&gt;
      &lt;label for="star1" title="poor!"&gt;1 star&lt;/label&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and jQuery is:</p>
  
  <pre><code>$(function () {
      $("div:has(input)").on("click", function (e) {
          var value = $(":radio").attr('value');
          alert(value);
      });
  });
  </code></pre>
  
  <p>please <a href="http://jsfiddle.net/CGP87/1664/" rel="nofollow">refer this JsFiddle</a></p>
  
  <p>currently <code>var value</code> is printing only <strong>5</strong> in clicking on any start. but i want precise Value in my output.</p>
  
  <p>Thanks in advance for help</p>