To rewrite a javascript to jQuery <p>I'm not a sharp jquery / javascript coder yet - so I hope that there is a kind soul out there, who can help me with rewriting a javascript into a jQuery script.</p> <p>The code looks like this:</p> <pre><code>&lt;script type="text/javascript"&gt; function update_delivery_address() { elm_true = document.getElementById('delivery_same_as_invoice_true'); elm_false = document.getElementById('delivery_same_as_invoice_false'); if (!elm_true.checked &amp;&amp; !elm_false.checked) { elm_true.checked = true; } if (elm_true.checked) { document.getElementById('delivery_name').value = ''; document.getElementById('delivery_att').value = ''; document.getElementById('delivery_address').value = ''; document.getElementById('delivery_zipcode').value = ''; document.getElementById('delivery_city').value = ''; document.getElementById('delivery_email').value = ''; document.getElementById('delivery_name').disabled = true; document.getElementById('delivery_att').disabled = true; document.getElementById('delivery_address').disabled = true; document.getElementById('delivery_zipcode').disabled = true; document.getElementById('delivery_city').disabled = true; document.getElementById('delivery_email').disabled = true; } else { document.getElementById('delivery_name').disabled = false; document.getElementById('delivery_att').disabled = false; document.getElementById('delivery_address').disabled = false; document.getElementById('delivery_zipcode').disabled = false; document.getElementById('delivery_city').disabled = false; document.getElementById('delivery_email').disabled = false; } } update_delivery_address(); &lt;/script&gt; </code></pre>