I have some radio buttons and want to add the value of the selected to the parent element (label) but this does not work:
jQuery(document).ready(function($){
var columns = $(".acf-field-59e775b8e5977 .acf-input .acf-button-group label.selected input").val();
if(columns == "4"){
$(this).parent().addClass("four");
}
});
This is the field:
<label class="selected"><input name="acf_1" value="4" checked="checked" type="radio">4/12</label>