$('input[name="shipping"]').click(function () { var checked = $(this).is(':checked'); var value = checked ? $(".shipping .country").val() : ''; $(".billing .country").val(value); });