Making shipping address fields mirror billing fields if the “Use billing address for shipping address” checkbox is checked.
<script type="text/javascript"> jQuery(document).ready(function($) { $("#fc_form_checkout input").blur(function() { if (!$("#use_different_addresses").is(":checked")) { var names = ["first_name","last_name","company","address1","address2","city","state_name","postal_code","phone"]; for (var i in names) { $("#shipping_"+names).val($("#customer_"+names).val()); } } }); }); </script>