I'm trying to copy the shipping address from the billing address when a checkbox is checked. I've searched the forums and I believe I have found the solution (using jquery) - however I can't seem to get it to work for me. So far my 'trial & error' method has got me nowhere - can someone help me with this? I've got the below code on my page (form ID is 32, checkbox ID is 3, billing name field ID is 1, shipping name field ID is 2):
<script type="text/javascript">
$(document).ready(function(){
$("#input_32_3").click(function(){
if ($("#input_32_3").is(':checked'))
{
$("#input_32_2").val($("#input_32_1").val());
}
else
{
$("#input_32_3").val("");
}
});
});
</script>