title: Using jQuery in WordPress
body: <p>Newbie to WP/jQuery.</p>
  
  <p>I've created a simple form in WP. Not using a plugin, just hand-coded it.</p>
  
  <p>I'm now trying to pass data from one form field to another using jQuery.</p>
  
  <p>I've checked that jQuery library is available to page and I have used wp_enqueue_script to also load a custom.js file.</p>
  
  <p>HTML (in WP page):</p>
  
  <pre><code>&lt;input id="field_1" name="field_1"&gt;
  
  &lt;input id="field_2" name="field_2"&gt;
  </code></pre>
  
  <p>jQuery (in custom.js):</p>
  
  <pre><code>$(document).ready(function () {
      $('#field_1').change(function () {
          $('#field_2').val($(this).val());
      });
  });
  </code></pre>
  
  <p>I have tested the code in a HTML page (outside of WP and it definitely works.</p>
  
  <p>I wonder if anyone can tell me what I'm doing wrong? Why doesn't it work?</p>