Following some previously answered questions her on Stack Overflow I am trying to show a div if the 'Female' radio box is checked and hide if the 'Male' checkbox is checked - this is the code I am using and it doesn't seem to do anything:
jQuery
jQuery(document).ready(function () {
jQuery('#genderSelect input:radio').click(function () {
if (jQuery('#genderSelect input:radio').val() === 'Female') {
jQuery(".joinFemaleForm").show("slow", function () {
// Animation complete.
});
} else if (jQuery('#genderSelect input:radio').val() === 'Male') {
jQuery(".joinFemaleForm").hide("slow", function () {
// Animation complete.
});
}
});
});
HTML
<span class="wpcf7-form-control wpcf7-radio" id="genderSelect">
<span class="wpcf7-list-item first"><input type="radio" name="male-female" value="Male"> <span class="wpcf7-list-item-label">Male</span></span>
<span class="wpcf7-list-item last"><input type="radio" name="male-female" value="Female"> <span class="wpcf7-list-item-label">Female</span></span>
</span>