How find which radio button is selected using jquery

<form>

<input type=”radio” id=”ratingPoint4″ name=”ratingPoint” value=”1″ />

<input type=”radio” id=”ratingPoint4″ name=”ratingPoint” value=”2″ />

<input type=”radio” id=”ratingPoint4″ name=”ratingPoint” value=”3″ />

<input type=”radio” id=”ratingPoint4″ name=”ratingPoint” value=”4″ />

<input id=”survey-submit” type=”submit” class=”survey-button aui-button” value=”Post”/>

</form>

<script>
jQuery(function(){
jQuery(“#survey-submit”).click(function(){
jQuery(“input[name=ratingPoint]”).each(function(){
if(jQuery(this).is(‘:checked’))
{
alert(jQuery(this).val());
}
});
});
});
</script>

Leave a Reply

Your email address will not be published. Required fields are marked *