Hi I attaching a part of my code which should hide the textbox and when female is selected it should show it. But this is not working
$(document).ready(function() {
$('input[name="gender"]').click(function() {
var value = $(this).val();
if( $value == "male")
{
$('#address').hide();
}
else{
$('#address').show();
}
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<style>
.error {color: #FF0000;}
</style>
Gender:
<input type="radio" name="gender" value="female">Female
<input type="radio" name="gender" value="male">Male
<div name="address" id="address">
<textarea name="address" id="address" rows="5" cols="40"></textarea>
</div>
<br><br>
Please help. Thanks