I'm trying to use radio buttons to show and hide a div but can't get the below to work, any help would be great?
$('input:radio[name="option"]').click(function() {
if ( $(this).val() == "pop" ) {
$(this).parent().next('.wrapper').show();
} else {
$(this).parent().next('.wrapper').hide();
}
});
<input name="option" type="radio">
<input name="option" type="radio" value="pop">
<div class="wrapper">text</div>