That is if i go and click over on text (that is Direct Visit not inside of radio button circle)it automatically select in inside of circle and have to show the fields (Start Time and EndTime). I tried to explain my issue as per my level best . please any one tell me it is possible to show the fields depend upon by selecting the radio button text in mvc4.
<div class="col-sm-4" id="VisitType">
<div class="form-group">
<span style="color: #f00">*</span>
@Html.Label("Visit Type", new { @class = "control-label" })
@Html.RadioButtonFor(model => model.VisitType, "true", new { id = "" }) Telephone
@Html.RadioButtonFor(model => model.VisitType, "false", new { id = "" }) Direct Visit
</div>
</div>
<div id="StartTime">
<div class="col-sm-3">
<div class="form-group">
@Html.Label("Start Time", new { @class = "control-label" })
@Html.TextBoxFor(model => model.StartTime, new { @class = "form-control ", type = "text" })
@Html.ValidationMessageFor(model => model.StartTime)
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
@Html.Label("End Time", new { @class = "control-label" })
@Html.TextBoxFor(model => model.EndTime, new { @class = "form-control ", type = "text" })
@Html.ValidationMessageFor(model => model.EndTime)
</div>
</div>
</div>
$(document).ready(function () {
$('#StartTime').hide();
$('#VisitType input[type="radio"]').change(function () {
if ($(this).val() === 'false') {
$('#StartTime').show();
}
else
{
$('#StartTime').hide();
}
});
});