I have the following radio buttons :
<label>Referred to Health Facility</label>
<input required name="Health_Ref" type="radio" class="wellness_center radiostyle Health_Ref" id="Health_Ref" value="Yes">
<div class="radiolabel">Yes</div>
<input name="Health_Ref" type="radio" required class="wellness_center radiostyle Health_Ref" id="Health_Ref" value="No" checked="checked">
<div class="radiolabel">No</div>
And below is my jquery function to get the values :
$(document).ready(function () {
$(".Health_Ref").click(function () {
var value = $(".Health_Ref").val();
alert(value);
});
});
The value being returned when i click the first or second button is for the first button which is Yes , how is the best way to implement the jquery function so that I can get the value of the clicked radio button ?